From 84202d89f0fa83790a4d3f78119f1fb62c1b3d9b Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 20 Dec 2006 07:04:08 +0000 Subject: 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. --- src/hci/commands/boot_cmd.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/hci/commands/boot_cmd.c (limited to 'src/hci/commands/boot_cmd.c') 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 +#include +#include + +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, +}; -- cgit v1.2.3-55-g7522