david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Quick hack to avoid trying to use an uninitialised net device.

This commit is contained in:
Michael Brown 2006-06-01 15:53:05 +00:00
parent 48fb6c6dc2
commit 6ab4b99f41
1 changed files with 16 additions and 4 deletions

View File

@ -27,6 +27,10 @@ Literature dealing with the network protocols:
#include "image.h"
#include <stdarg.h>
#include <gpxe/device.h>
#include <gpxe/heap.h>
#include <gpxe/netdevice.h>
#ifdef CONFIG_FILO
#include <lib.h>
#endif
@ -148,16 +152,24 @@ extern struct net_device static_single_netdev;
MAIN - Kick off routine
**************************************************************************/
int main ( void ) {
struct image *image;
void *image_context;
int skip = 0;
struct net_device *netdev;
/* Call all registered initialisation functions */
init_heap();
call_init_fns ();
probe_devices();
test_aoeboot ( &static_single_netdev );
/* 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 );
} else {
printf ( "No network device found\n" );
}
printf ( "Press any key to exit\n" );
getchar();