diff --git a/src/core/main.c b/src/core/main.c index 59f710ac..a34eb889 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -33,7 +33,7 @@ Literature dealing with the network protocols: #include #include #include -#include +#include /* Linker symbols */ extern char _bss[], _ebss[]; diff --git a/src/hci/commands/boot_cmd.c b/src/hci/commands/boot_cmd.c index 0681ec54..fd8cba74 100644 --- a/src/hci/commands/boot_cmd.c +++ b/src/hci/commands/boot_cmd.c @@ -1,18 +1,22 @@ #include #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] ); + printf ( "Usage:\n" + " %s\n" + "\n" + "Attempts to boot the system\n", + argv[0] ); return 1; } autoboot(); - return 0; + /* Can never return success by definition */ + return 1; } struct command boot_command __command = { diff --git a/src/include/gpxe/autoboot.h b/src/include/gpxe/autoboot.h deleted file mode 100644 index bea2e4b3..00000000 --- a/src/include/gpxe/autoboot.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _GPXE_AUTOBOOT_H -#define _GPXE_AUTOBOOT_H - -/** @file - * - * Automatic booting - * - */ - -extern void autoboot ( void ); - -#endif /* _GPXE_AUTOBOOT_H */ diff --git a/src/include/usr/autoboot.h b/src/include/usr/autoboot.h new file mode 100644 index 00000000..4ddeb5bc --- /dev/null +++ b/src/include/usr/autoboot.h @@ -0,0 +1,12 @@ +#ifndef _USR_AUTOBOOT_H +#define _USR_AUTOBOOT_H + +/** @file + * + * Automatic booting + * + */ + +extern void autoboot ( void ); + +#endif /* _USR_AUTOBOOT_H */ diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c index 5cfde823..057b70cd 100644 --- a/src/usr/autoboot.c +++ b/src/usr/autoboot.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include /** @file * @@ -39,6 +39,8 @@ void autoboot ( void ) { if ( ( rc = ifopen ( netdev ) ) != 0 ) continue; + ifstat ( netdev ); + test_dhcp ( netdev ); ifclose ( netdev );