diff options
author | Michael Brown <mcb30@etherboot.org> | 2006-12-20 07:04:08 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2006-12-20 07:04:08 +0000 |
commit | 84202d89f0fa83790a4d3f78119f1fb62c1b3d9b (patch) | |
tree | 066eba0ee9db7e82922e662e7d6e5c29ac59d021 /src/hci/commands | |
parent | 9ab17484d0b6c8b849990e669f4836eae1680e67 (diff) | |
download | ipxe-84202d89f0fa83790a4d3f78119f1fb62c1b3d9b.tar.gz |
Split the (quick hack) boot logic out from main.c to autoboot.c, add a
"boot" command to attempt booting from within the command shell, fall back
to shell if boot fails for any reason.
Diffstat (limited to 'src/hci/commands')
-rw-r--r-- | src/hci/commands/boot_cmd.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/hci/commands/boot_cmd.c b/src/hci/commands/boot_cmd.c new file mode 100644 index 00000000..0681ec54 --- /dev/null +++ b/src/hci/commands/boot_cmd.c @@ -0,0 +1,21 @@ +#include <vsprintf.h> +#include <gpxe/command.h> +#include <gpxe/autoboot.h> + +static int boot_exec ( int argc, char **argv ) { + + if ( argc != 1 ) { + printf ( "Usage: %s\n" + "Attempts to boot the system\n", argv[0] ); + return 1; + } + + autoboot(); + + return 0; +} + +struct command boot_command __command = { + .name = "boot", + .exec = boot_exec, +}; |