mirror of https://github.com/ipxe/ipxe.git
Move header file for usr/autoboot.c to include/usr
parent
d24b80acf2
commit
55e590ab3a
|
@ -33,7 +33,7 @@ Literature dealing with the network protocols:
|
||||||
#include <gpxe/netdevice.h>
|
#include <gpxe/netdevice.h>
|
||||||
#include <gpxe/shell.h>
|
#include <gpxe/shell.h>
|
||||||
#include <gpxe/shell_banner.h>
|
#include <gpxe/shell_banner.h>
|
||||||
#include <gpxe/autoboot.h>
|
#include <usr/autoboot.h>
|
||||||
|
|
||||||
/* Linker symbols */
|
/* Linker symbols */
|
||||||
extern char _bss[], _ebss[];
|
extern char _bss[], _ebss[];
|
||||||
|
|
|
@ -1,18 +1,22 @@
|
||||||
#include <vsprintf.h>
|
#include <vsprintf.h>
|
||||||
#include <gpxe/command.h>
|
#include <gpxe/command.h>
|
||||||
#include <gpxe/autoboot.h>
|
#include <usr/autoboot.h>
|
||||||
|
|
||||||
static int boot_exec ( int argc, char **argv ) {
|
static int boot_exec ( int argc, char **argv ) {
|
||||||
|
|
||||||
if ( argc != 1 ) {
|
if ( argc != 1 ) {
|
||||||
printf ( "Usage: %s\n"
|
printf ( "Usage:\n"
|
||||||
"Attempts to boot the system\n", argv[0] );
|
" %s\n"
|
||||||
|
"\n"
|
||||||
|
"Attempts to boot the system\n",
|
||||||
|
argv[0] );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
autoboot();
|
autoboot();
|
||||||
|
|
||||||
return 0;
|
/* Can never return success by definition */
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct command boot_command __command = {
|
struct command boot_command __command = {
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#ifndef _GPXE_AUTOBOOT_H
|
|
||||||
#define _GPXE_AUTOBOOT_H
|
|
||||||
|
|
||||||
/** @file
|
|
||||||
*
|
|
||||||
* Automatic booting
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern void autoboot ( void );
|
|
||||||
|
|
||||||
#endif /* _GPXE_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 */
|
|
@ -20,7 +20,7 @@
|
||||||
#include <vsprintf.h>
|
#include <vsprintf.h>
|
||||||
#include <gpxe/netdevice.h>
|
#include <gpxe/netdevice.h>
|
||||||
#include <usr/ifmgmt.h>
|
#include <usr/ifmgmt.h>
|
||||||
#include <gpxe/autoboot.h>
|
#include <usr/autoboot.h>
|
||||||
|
|
||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
|
@ -39,6 +39,8 @@ void autoboot ( void ) {
|
||||||
if ( ( rc = ifopen ( netdev ) ) != 0 )
|
if ( ( rc = ifopen ( netdev ) ) != 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
ifstat ( netdev );
|
||||||
|
|
||||||
test_dhcp ( netdev );
|
test_dhcp ( netdev );
|
||||||
|
|
||||||
ifclose ( netdev );
|
ifclose ( netdev );
|
||||||
|
|
Loading…
Reference in New Issue