Browse Source

Move header file for usr/autoboot.c to include/usr

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
55e590ab3a
5 changed files with 24 additions and 18 deletions
  1. 1
    1
      src/core/main.c
  2. 8
    4
      src/hci/commands/boot_cmd.c
  3. 0
    12
      src/include/gpxe/autoboot.h
  4. 12
    0
      src/include/usr/autoboot.h
  5. 3
    1
      src/usr/autoboot.c

+ 1
- 1
src/core/main.c View File

@@ -33,7 +33,7 @@ Literature dealing with the network protocols:
33 33
 #include <gpxe/netdevice.h>
34 34
 #include <gpxe/shell.h>
35 35
 #include <gpxe/shell_banner.h>
36
-#include <gpxe/autoboot.h>
36
+#include <usr/autoboot.h>
37 37
 
38 38
 /* Linker symbols */
39 39
 extern char _bss[], _ebss[];

+ 8
- 4
src/hci/commands/boot_cmd.c View File

@@ -1,18 +1,22 @@
1 1
 #include <vsprintf.h>
2 2
 #include <gpxe/command.h>
3
-#include <gpxe/autoboot.h>
3
+#include <usr/autoboot.h>
4 4
 
5 5
 static int boot_exec ( int argc, char **argv ) {
6 6
 
7 7
 	if ( argc != 1 ) {
8
-		printf ( "Usage: %s\n"
9
-			 "Attempts to boot the system\n", argv[0] );
8
+		printf ( "Usage:\n"
9
+			 "  %s\n"
10
+			 "\n"
11
+			 "Attempts to boot the system\n",
12
+			 argv[0] );
10 13
 		return 1;
11 14
 	}
12 15
 
13 16
 	autoboot();
14 17
 
15
-	return 0;
18
+	/* Can never return success by definition */
19
+	return 1;
16 20
 }
17 21
 
18 22
 struct command boot_command __command = {

+ 0
- 12
src/include/gpxe/autoboot.h View File

@@ -1,12 +0,0 @@
1
-#ifndef _GPXE_AUTOBOOT_H
2
-#define _GPXE_AUTOBOOT_H
3
-
4
-/** @file
5
- *
6
- * Automatic booting
7
- *
8
- */
9
-
10
-extern void autoboot ( void );
11
-
12
-#endif /* _GPXE_AUTOBOOT_H */

+ 12
- 0
src/include/usr/autoboot.h View File

@@ -0,0 +1,12 @@
1
+#ifndef _USR_AUTOBOOT_H
2
+#define _USR_AUTOBOOT_H
3
+
4
+/** @file
5
+ *
6
+ * Automatic booting
7
+ *
8
+ */
9
+
10
+extern void autoboot ( void );
11
+
12
+#endif /* _USR_AUTOBOOT_H */

+ 3
- 1
src/usr/autoboot.c View File

@@ -20,7 +20,7 @@
20 20
 #include <vsprintf.h>
21 21
 #include <gpxe/netdevice.h>
22 22
 #include <usr/ifmgmt.h>
23
-#include <gpxe/autoboot.h>
23
+#include <usr/autoboot.h>
24 24
 
25 25
 /** @file
26 26
  *
@@ -39,6 +39,8 @@ void autoboot ( void ) {
39 39
 		if ( ( rc = ifopen ( netdev ) ) != 0 )
40 40
 			continue;
41 41
 
42
+		ifstat ( netdev );
43
+
42 44
 		test_dhcp ( netdev );
43 45
 		
44 46
 		ifclose ( netdev );

Loading…
Cancel
Save