From ce5c899f22106926ca50c153a600b537d08970bc Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 4 Jul 2008 17:47:11 +0100 Subject: stubdom: use host's gcc This makes stubdom use the host's gcc instead of downloading/compiling binutils+gcc. That requires a bunch of changes and even uncovered a few bugs, but saves a lot of time. Signed-off-by: Samuel Thibault --- extras/mini-os/lwip-net.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'extras/mini-os/lwip-net.c') diff --git a/extras/mini-os/lwip-net.c b/extras/mini-os/lwip-net.c index 4e7ffbdabf..194ae2711e 100644 --- a/extras/mini-os/lwip-net.c +++ b/extras/mini-os/lwip-net.c @@ -93,6 +93,9 @@ static err_t netfront_output(struct netif *netif, struct pbuf *p, static err_t low_level_output(struct netif *netif, struct pbuf *p) { + if (!dev) + return ERR_OK; + #ifdef ETH_PAD_SIZE pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */ #endif @@ -342,7 +345,7 @@ void start_networking(void) struct ip_addr ipaddr = { htonl(IF_IPADDR) }; struct ip_addr netmask = { htonl(IF_NETMASK) }; struct ip_addr gw = { 0 }; - char *ip; + char *ip = NULL; tprintk("Waiting for network.\n"); @@ -380,5 +383,6 @@ void start_networking(void) /* Shut down the network */ void stop_networking(void) { - shutdown_netfront(dev); + if (dev) + shutdown_netfront(dev); } -- cgit v1.2.3