diff options
author | Shao Miller | 2008-12-23 16:46:00 +0100 |
---|---|---|
committer | Michael Brown | 2009-02-24 06:28:14 +0100 |
commit | 43834f5d25273054679cb67ba7a5870f99b874b4 (patch) | |
tree | 71a10427dc14ab2b50249e4ce06c530796eefe71 | |
parent | [pxe] Set %ax to zero on entry to PXE NBP (diff) | |
download | ipxe-43834f5d25273054679cb67ba7a5870f99b874b4.tar.gz ipxe-43834f5d25273054679cb67ba7a5870f99b874b4.tar.xz ipxe-43834f5d25273054679cb67ba7a5870f99b874b4.zip |
[image] Added "chain" command to fetch, load, and execute image
The "chain" command combines the functions of "imgfetch", "imgload",
and "boot".
chain http://etherboot.org/gtest/gtest.gpxe
is equivalent to:
kernel http://etherboot.org/gtest/gtest.gpxe
boot
-rw-r--r-- | src/hci/commands/image_cmd.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/hci/commands/image_cmd.c b/src/hci/commands/image_cmd.c index d1a38c47..befa5a64 100644 --- a/src/hci/commands/image_cmd.c +++ b/src/hci/commands/image_cmd.c @@ -222,6 +222,22 @@ static int kernel_exec ( int argc, char **argv ) { } /** + * The "imgauto" command + * + * @v argc Argument count + * @v argv Argument list + * @ret rc Exit code + */ +static int imgauto_exec ( int argc, char **argv) { + int rc; + + if ( ( rc = imgfetch_core_exec ( NULL, IMG_EXEC, argc, argv ) ) != 0 ) + return rc; + + return 0; +} + +/** * "imgload" command syntax message * * @v argv Argument list @@ -547,6 +563,10 @@ struct command image_commands[] __command = { .exec = kernel_exec, }, { + .name = "imgauto", + .exec = imgauto_exec, + }, + { .name = "imgload", .exec = imgload_exec, }, |