diff options
| author | Michael Brown | 2007-01-12 06:26:19 +0100 |
|---|---|---|
| committer | Michael Brown | 2007-01-12 06:26:19 +0100 |
| commit | 9debfed07a4231db4a499ad81e1c64aca3b20747 (patch) | |
| tree | 49c625c0fe527acfa5d9485cc488032a2c4f999b /src/include | |
| parent | Added basename() to make automatically naming images easier. (diff) | |
| download | ipxe-9debfed07a4231db4a499ad81e1c64aca3b20747.tar.gz ipxe-9debfed07a4231db4a499ad81e1c64aca3b20747.tar.xz ipxe-9debfed07a4231db4a499ad81e1c64aca3b20747.zip | |
Place command-line inline, to save on memory allocation hassles.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/image.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/include/gpxe/image.h b/src/include/gpxe/image.h index da0f3cfde..efc6a642b 100644 --- a/src/include/gpxe/image.h +++ b/src/include/gpxe/image.h @@ -14,6 +14,9 @@ struct image_type; +/** Maximum length of a command line */ +#define CMDLINE_MAX 128 + /** An executable or loadable image */ struct image { /** Name */ @@ -22,12 +25,20 @@ struct image { struct list_head list; /** Command line to pass to image */ - const char *cmdline; + char cmdline[CMDLINE_MAX]; /** Raw file 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; |
