From 9debfed07a4231db4a499ad81e1c64aca3b20747 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 12 Jan 2007 05:26:19 +0000 Subject: Place command-line inline, to save on memory allocation hassles. --- src/include/gpxe/image.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/include') 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; -- cgit v1.2.3-55-g7522