aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/lwip-net.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-07-04 17:47:11 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-07-04 17:47:11 +0100
commitce5c899f22106926ca50c153a600b537d08970bc (patch)
treee23cbd3e5901a3178957ee36b22f1277832858b2 /extras/mini-os/lwip-net.c
parent355b0469a8d017b80d9ce1078c90fe628c8b3bbe (diff)
downloadxen-ce5c899f22106926ca50c153a600b537d08970bc.tar.gz
xen-ce5c899f22106926ca50c153a600b537d08970bc.tar.bz2
xen-ce5c899f22106926ca50c153a600b537d08970bc.zip
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 <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/lwip-net.c')
-rw-r--r--extras/mini-os/lwip-net.c8
1 files changed, 6 insertions, 2 deletions
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);
}