Skip to content

Commit

Permalink
[image] Added "chain" command to fetch, load, and execute image
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Shao Miller authored and Michael Brown committed Feb 24, 2009
1 parent 784d3f3 commit 43834f5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/hci/commands/image_cmd.c
Expand Up @@ -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
*
Expand Down Expand Up @@ -546,6 +562,10 @@ struct command image_commands[] __command = {
.name = "kernel",
.exec = kernel_exec,
},
{
.name = "imgauto",
.exec = imgauto_exec,
},
{
.name = "imgload",
.exec = imgload_exec,
Expand Down

0 comments on commit 43834f5

Please sign in to comment.