diff options
| author | Michael Brown | 2007-01-12 09:02:27 +0100 |
|---|---|---|
| committer | Michael Brown | 2007-01-12 09:02:27 +0100 |
| commit | 475d6d1f7c7f169a89ea363ad819b0dd2975ae10 (patch) | |
| tree | 000239996a57f863fb56326ed137bf85c3517934 /src/include | |
| parent | Allow "imgexec" with no arguments to boot the file that was loaded with (diff) | |
| download | ipxe-475d6d1f7c7f169a89ea363ad819b0dd2975ae10.tar.gz ipxe-475d6d1f7c7f169a89ea363ad819b0dd2975ae10.tar.xz ipxe-475d6d1f7c7f169a89ea363ad819b0dd2975ae10.zip | |
fetch() now knows nothing about struct image; it simply loads a file and
returns the allocated buffer.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/image.h | 8 | ||||
| -rw-r--r-- | src/include/usr/fetch.h | 7 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/include/gpxe/image.h b/src/include/gpxe/image.h index 7f11e6a0c..5367735c8 100644 --- a/src/include/gpxe/image.h +++ b/src/include/gpxe/image.h @@ -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; diff --git a/src/include/usr/fetch.h b/src/include/usr/fetch.h index e7c035be5..372f6f8cd 100644 --- a/src/include/usr/fetch.h +++ b/src/include/usr/fetch.h @@ -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 */ |
