fetch() now knows nothing about struct image; it simply loads a file and

returns the allocated buffer.
This commit is contained in:
Michael Brown
2007-01-12 08:02:27 +00:00
parent 2876197306
commit 475d6d1f7c
5 changed files with 19 additions and 22 deletions

View File

@@ -31,14 +31,6 @@ struct image {
userptr_t data;
/** Length of raw file image */
size_t len;
/**
* Free raw file image
*
* @v data Raw file image
*
* Call this method before freeing up the @c struct @c image.
*/
void ( * free ) ( userptr_t data );
/** Entry point */
physaddr_t entry;

View File

@@ -4,10 +4,13 @@
/**
* @file
*
* Fetch file as executable/loadable image
* Fetch file
*
*/
extern int fetch ( struct image *image, const char *filename );
#include <stdint.h>
#include <gpxe/uaccess.h>
extern int fetch ( const char *filename, userptr_t *data, size_t *len );
#endif /* _USR_FETCH_H */