summaryrefslogtreecommitdiffstats
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2008-10-02 20:21:13 +0000
committerbrad <brad@openbsd.org>2008-10-02 20:21:13 +0000
commit775775fec3b9155582266cd00096557b185a1d79 (patch)
tree3c0ef62589040193591e9c752cb4041d3b57f0e3 /sys/net/if_ethersubr.c
parentsync (diff)
downloadwireguard-openbsd-775775fec3b9155582266cd00096557b185a1d79.tar.xz
wireguard-openbsd-775775fec3b9155582266cd00096557b185a1d79.zip
First step towards cleaning up the Ethernet driver ioctl handling.
Move calling ether_ioctl() from the top of the ioctl function, which at the moment does absolutely nothing, to the default switch case. Thus allowing drivers to define their own ioctl handlers and then falling back on ether_ioctl(). The only functional change this results in at the moment is having all Ethernet drivers returning the proper errno of ENOTTY instead of EINVAL/ENXIO when encountering unknown ioctl's. Shrinks the i386 kernels by.. RAMDISK - 1024 bytes RAMDISKB - 1120 bytes RAMDISKC - 832 bytes Tested by martin@/jsing@/todd@/brad@ Build tested on almost all archs by todd@/brad@ ok jsing@
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index eb89e854ded..6315867c53b 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.124 2008/08/28 13:10:54 brad Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.125 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -172,7 +172,6 @@ ether_ioctl(ifp, arp, cmd, data)
int error = 0;
switch (cmd) {
-
case SIOCSIFADDR:
switch (ifa->ifa_addr->sa_family) {
#ifdef NETATALK
@@ -183,7 +182,7 @@ ether_ioctl(ifp, arp, cmd, data)
}
break;
default:
- break;
+ error = ENOTTY;
}
return error;