summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2007-01-10 03:03:20 +0100
committerMichael Brown2007-01-10 03:03:20 +0100
commit55e590ab3aeac9a7fb5067bcef1e79922d91e67a (patch)
tree4b6cec58e83818b9d71d29cdd4a8d4ef97b5e992
parentAdded network interface management commands (diff)
downloadipxe-55e590ab3aeac9a7fb5067bcef1e79922d91e67a.tar.gz
ipxe-55e590ab3aeac9a7fb5067bcef1e79922d91e67a.tar.xz
ipxe-55e590ab3aeac9a7fb5067bcef1e79922d91e67a.zip
Move header file for usr/autoboot.c to include/usr
-rw-r--r--src/core/main.c2
-rw-r--r--src/hci/commands/boot_cmd.c12
-rw-r--r--src/include/gpxe/autoboot.h12
-rw-r--r--src/include/usr/autoboot.h12
-rw-r--r--src/usr/autoboot.c4
5 files changed, 24 insertions, 18 deletions
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 <gpxe/netdevice.h>
#include <gpxe/shell.h>
#include <gpxe/shell_banner.h>
-#include <gpxe/autoboot.h>
+#include <usr/autoboot.h>
/* 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 <vsprintf.h>
#include <gpxe/command.h>
-#include <gpxe/autoboot.h>
+#include <usr/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] );
+ 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 <vsprintf.h>
#include <gpxe/netdevice.h>
#include <usr/ifmgmt.h>
-#include <gpxe/autoboot.h>
+#include <usr/autoboot.h>
/** @file
*
@@ -39,6 +39,8 @@ void autoboot ( void ) {
if ( ( rc = ifopen ( netdev ) ) != 0 )
continue;
+ ifstat ( netdev );
+
test_dhcp ( netdev );
ifclose ( netdev );