From 43834f5d25273054679cb67ba7a5870f99b874b4 Mon Sep 17 00:00:00 2001 From: Shao Miller Date: Tue, 23 Dec 2008 10:46:00 -0500 Subject: [PATCH] [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 --- src/hci/commands/image_cmd.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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 @@ -221,6 +221,22 @@ static int kernel_exec ( int argc, char **argv ) { return 0; } +/** + * 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 * @@ -546,6 +562,10 @@ struct command image_commands[] __command = { .name = "kernel", .exec = kernel_exec, }, + { + .name = "imgauto", + .exec = imgauto_exec, + }, { .name = "imgload", .exec = imgload_exec,