mirror of https://github.com/ipxe/ipxe.git
Quick hack to avoid trying to use an uninitialised net device.
parent
48fb6c6dc2
commit
6ab4b99f41
|
@ -27,6 +27,10 @@ Literature dealing with the network protocols:
|
||||||
#include "image.h"
|
#include "image.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include <gpxe/device.h>
|
||||||
|
#include <gpxe/heap.h>
|
||||||
|
#include <gpxe/netdevice.h>
|
||||||
|
|
||||||
#ifdef CONFIG_FILO
|
#ifdef CONFIG_FILO
|
||||||
#include <lib.h>
|
#include <lib.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -148,16 +152,24 @@ extern struct net_device static_single_netdev;
|
||||||
MAIN - Kick off routine
|
MAIN - Kick off routine
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
int main ( void ) {
|
int main ( void ) {
|
||||||
struct image *image;
|
struct net_device *netdev;
|
||||||
void *image_context;
|
|
||||||
int skip = 0;
|
|
||||||
|
|
||||||
/* Call all registered initialisation functions */
|
/* Call all registered initialisation functions */
|
||||||
init_heap();
|
init_heap();
|
||||||
call_init_fns ();
|
call_init_fns ();
|
||||||
probe_devices();
|
probe_devices();
|
||||||
|
|
||||||
|
/* Quick hack until netdevice.c uses proper dynamic registration */
|
||||||
|
netdev = &static_single_netdev;
|
||||||
|
if ( ! netdev->poll )
|
||||||
|
netdev = NULL;
|
||||||
|
|
||||||
|
if ( netdev ) {
|
||||||
test_aoeboot ( &static_single_netdev );
|
test_aoeboot ( &static_single_netdev );
|
||||||
|
} else {
|
||||||
|
printf ( "No network device found\n" );
|
||||||
|
}
|
||||||
|
|
||||||
printf ( "Press any key to exit\n" );
|
printf ( "Press any key to exit\n" );
|
||||||
getchar();
|
getchar();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue