Browse Source

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

tags/v0.9.3
Michael Brown 18 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
 #include <gpxe/netdevice.h>
33
 #include <gpxe/netdevice.h>
34
 #include <gpxe/shell.h>
34
 #include <gpxe/shell.h>
35
 #include <gpxe/shell_banner.h>
35
 #include <gpxe/shell_banner.h>
36
-#include <gpxe/autoboot.h>
36
+#include <usr/autoboot.h>
37
 
37
 
38
 /* Linker symbols */
38
 /* Linker symbols */
39
 extern char _bss[], _ebss[];
39
 extern char _bss[], _ebss[];

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

1
 #include <vsprintf.h>
1
 #include <vsprintf.h>
2
 #include <gpxe/command.h>
2
 #include <gpxe/command.h>
3
-#include <gpxe/autoboot.h>
3
+#include <usr/autoboot.h>
4
 
4
 
5
 static int boot_exec ( int argc, char **argv ) {
5
 static int boot_exec ( int argc, char **argv ) {
6
 
6
 
7
 	if ( argc != 1 ) {
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
 		return 1;
13
 		return 1;
11
 	}
14
 	}
12
 
15
 
13
 	autoboot();
16
 	autoboot();
14
 
17
 
15
-	return 0;
18
+	/* Can never return success by definition */
19
+	return 1;
16
 }
20
 }
17
 
21
 
18
 struct command boot_command __command = {
22
 struct command boot_command __command = {

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

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

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

Loading…
Cancel
Save