summaryrefslogtreecommitdiff
path: root/sys/arch/vax/if/sgec.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-10-02 20:21:16 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-10-02 20:21:16 +0000
commit8d3b73e0ab70c1110b5b479b02809b80891945cc (patch)
tree6f9f4aecd17358436877da1307c753e5db774045 /sys/arch/vax/if/sgec.c
parent6d6833da157e83635382235a3f52b938de757cc4 (diff)
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/arch/vax/if/sgec.c')
-rw-r--r--sys/arch/vax/if/sgec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/arch/vax/if/sgec.c b/sys/arch/vax/if/sgec.c
index e7dce2eddcc..f87af9772e8 100644
--- a/sys/arch/vax/if/sgec.c
+++ b/sys/arch/vax/if/sgec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sgec.c,v 1.16 2008/08/22 17:09:06 deraadt Exp $ */
+/* $OpenBSD: sgec.c,v 1.17 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: sgec.c,v 1.5 2000/06/04 02:14:14 matt Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -630,7 +630,6 @@ zeioctl(ifp, cmd, data)
int s = splnet(), error = 0;
switch (cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
switch(ifa->ifa_addr->sa_family) {
@@ -696,9 +695,9 @@ zeioctl(ifp, cmd, data)
break;
default:
- error = EINVAL;
-
+ error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
}
+
splx(s);
return (error);
}