summaryrefslogtreecommitdiff
path: root/pfinet/ethernet.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1998-10-24 08:39:20 +0000
committerRoland McGrath <roland@gnu.org>1998-10-24 08:39:20 +0000
commit1e33d8bd37f1adf0ea5a3f0833f0897e42c3880e (patch)
tree017c73d30ec8dd13ac4c9b07b40356914c2ff771 /pfinet/ethernet.c
parentd5fbc17f93deb920d2d13e7f257a0470f5ba5953 (diff)
1998-10-24 Roland McGrath <roland@baalperazim.frob.com>
* 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.
Diffstat (limited to 'pfinet/ethernet.c')
-rw-r--r--pfinet/ethernet.c6
1 files changed, 4 insertions, 2 deletions
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 <linux/etherdevice.h>
#include <netinet/in.h>
#include <string.h>
+#include <error.h>
#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);