diff options
author | Michael Brown | 2009-02-24 06:51:21 +0100 |
---|---|---|
committer | Michael Brown | 2009-02-24 06:57:56 +0100 |
commit | 4f3bab1a55359a2623e098a6ed61e8d82145af77 (patch) | |
tree | 9f12c983dd2846d5b5f2d0598d928db9add7c51b /src/hci/commands/image_cmd.c | |
parent | [image] Added "chain" command to fetch, load, and execute image (diff) | |
download | ipxe-4f3bab1a55359a2623e098a6ed61e8d82145af77.tar.gz ipxe-4f3bab1a55359a2623e098a6ed61e8d82145af77.tar.xz ipxe-4f3bab1a55359a2623e098a6ed61e8d82145af77.zip |
[image] Allow for zero embedded images
Having a default script containing
#!gpxe
autoboot
can cause problems when entering commands to load and start a kernel
manually; the default script image will still be present when the
kernel is started and so will be treated as an initrd. It is possible
to work around this by typing "imgfree" before any other commands, but
this is counter-intuitive.
Fix by allowing the embedded image list to be empty (in which case we
just call autoboot()), and making this the default.
Reported by alkisg@gmail.com.
Diffstat (limited to 'src/hci/commands/image_cmd.c')
-rw-r--r-- | src/hci/commands/image_cmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hci/commands/image_cmd.c b/src/hci/commands/image_cmd.c index befa5a64..6d8b5908 100644 --- a/src/hci/commands/image_cmd.c +++ b/src/hci/commands/image_cmd.c @@ -222,13 +222,13 @@ static int kernel_exec ( int argc, char **argv ) { } /** - * The "imgauto" command + * The "chain" command * * @v argc Argument count * @v argv Argument list * @ret rc Exit code */ -static int imgauto_exec ( int argc, char **argv) { +static int chain_exec ( int argc, char **argv) { int rc; if ( ( rc = imgfetch_core_exec ( NULL, IMG_EXEC, argc, argv ) ) != 0 ) @@ -563,8 +563,8 @@ struct command image_commands[] __command = { .exec = kernel_exec, }, { - .name = "imgauto", - .exec = imgauto_exec, + .name = "chain", + .exec = chain_exec, }, { .name = "imgload", |