From 1e33d8bd37f1adf0ea5a3f0833f0897e42c3880e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 24 Oct 1998 08:39:20 +0000 Subject: 1998-10-24 Roland McGrath * ethernet.c (ethernet_open): Check error return from device_open and device_set_filter. (setup_ethernet_device): Check error return from device_get_status. * ethernet.c (ethername): Remove static variable. (setup_ethernet_device): Don't set it. (ethernet_open): Don't use it; use DEV->name instead. --- pfinet/ethernet.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pfinet/ethernet.c') diff --git a/pfinet/ethernet.c b/pfinet/ethernet.c index 52594594..fcdb6207 100644 --- a/pfinet/ethernet.c +++ b/pfinet/ethernet.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "pfinet.h" @@ -187,6 +188,7 @@ setup_ethernet_device (char *name) u_int count; int net_address[2]; int i; + error_t err; etherport_bucket = ports_create_bucket (); @@ -223,7 +225,7 @@ setup_ethernet_device (char *name) err = device_get_status (ether_port, NET_STATUS, (dev_status_t) &netstat, &count); if (err) - error (2, err, "%s: Cannot get device status", name) + error (2, err, "%s: Cannot get device status", name); ether_dev.mtu = netstat.max_packet_size - ether_dev.hard_header_len; assert (netstat.header_format == HDR_ETHERNET); assert (netstat.header_size == ETH_HLEN); @@ -233,7 +235,7 @@ setup_ethernet_device (char *name) assert (count * sizeof (int) >= ETH_ALEN); err = device_get_status (ether_port, NET_ADDRESS, net_address, &count); if (err) - error (2, err, "%s: Cannot get hardware Ethernet address", name) + error (2, err, "%s: Cannot get hardware Ethernet address", name); net_address[0] = ntohl (net_address[0]); net_address[1] = ntohl (net_address[1]); bcopy (net_address, ether_dev.dev_addr, ETH_ALEN); -- cgit v1.2.3