diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2007-12-20 02:53:03 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2007-12-20 02:53:03 +0000 |
commit | 42bb4abb0daa17ed7ce6b235f9f0f8f59c020644 (patch) | |
tree | ec7bad3d71a8c832cec82cc33d727ed1d38c660e /sys | |
parent | 1eb9eea193d15734fb92ea2c17465f6fb5641ec5 (diff) |
return with ENOTTY instead of EINVAL for unknown ioctl requests.
ok claudio@ krw@ jason@ dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_bridge.c | 4 | ||||
-rw-r--r-- | sys/net/if_enc.c | 4 | ||||
-rw-r--r-- | sys/net/if_faith.c | 4 | ||||
-rw-r--r-- | sys/net/if_gif.c | 4 | ||||
-rw-r--r-- | sys/net/if_gre.c | 4 | ||||
-rw-r--r-- | sys/net/if_loop.c | 4 | ||||
-rw-r--r-- | sys/net/if_media.c | 4 | ||||
-rw-r--r-- | sys/net/if_pflog.c | 4 | ||||
-rw-r--r-- | sys/net/if_sl.c | 4 | ||||
-rw-r--r-- | sys/net/if_tun.c | 4 | ||||
-rw-r--r-- | sys/net/if_vlan.c | 4 |
11 files changed, 22 insertions, 22 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 63adb652da0..913965ea0c9 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.165 2007/09/15 16:43:51 henning Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.166 2007/12/20 02:53:02 brad Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -713,7 +713,7 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = suser(curproc, 0); break; default: - error = EINVAL; + error = ENOTTY; break; } diff --git a/sys/net/if_enc.c b/sys/net/if_enc.c index cec5ca413c6..d97e089b97e 100644 --- a/sys/net/if_enc.c +++ b/sys/net/if_enc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_enc.c,v 1.46 2007/05/26 17:13:30 jason Exp $ */ +/* $OpenBSD: if_enc.c,v 1.47 2007/12/20 02:53:02 brad Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -152,7 +152,7 @@ encioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags &= ~IFF_RUNNING; break; default: - return (EINVAL); + return (ENOTTY); } return 0; diff --git a/sys/net/if_faith.c b/sys/net/if_faith.c index f6a772ece8f..d45bafa56dd 100644 --- a/sys/net/if_faith.c +++ b/sys/net/if_faith.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_faith.c,v 1.23 2007/09/15 16:43:51 henning Exp $ */ +/* $OpenBSD: if_faith.c,v 1.24 2007/12/20 02:53:02 brad Exp $ */ /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. @@ -256,7 +256,7 @@ faithioctl(ifp, cmd, data) break; default: - error = EINVAL; + error = ENOTTY; } return (error); } diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index 56a377123dd..4dc83de66a5 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gif.c,v 1.46 2007/09/15 16:43:51 henning Exp $ */ +/* $OpenBSD: if_gif.c,v 1.47 2007/12/20 02:53:02 brad Exp $ */ /* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */ /* @@ -617,7 +617,7 @@ gif_ioctl(ifp, cmd, data) break; default: - error = EINVAL; + error = ENOTTY; break; } bad: diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 3e17572f67a..6c93651f030 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gre.c,v 1.42 2007/09/15 16:43:51 henning Exp $ */ +/* $OpenBSD: if_gre.c,v 1.43 2007/12/20 02:53:02 brad Exp $ */ /* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */ /* @@ -578,7 +578,7 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) memcpy(&lifr->dstaddr, &si, sizeof(si)); break; default: - error = EINVAL; + error = ENOTTY; } splx(s); diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index eb7169144ad..8966b45016c 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_loop.c,v 1.42 2007/09/15 16:43:51 henning Exp $ */ +/* $OpenBSD: if_loop.c,v 1.43 2007/12/20 02:53:02 brad Exp $ */ /* $NetBSD: if_loop.c,v 1.15 1996/05/07 02:40:33 thorpej Exp $ */ /* @@ -451,7 +451,7 @@ loioctl(ifp, cmd, data) break; default: - error = EINVAL; + error = ENOTTY; } return (error); } diff --git a/sys/net/if_media.c b/sys/net/if_media.c index 7874c654114..7abce32eb90 100644 --- a/sys/net/if_media.c +++ b/sys/net/if_media.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_media.c,v 1.18 2007/09/19 08:45:54 brad Exp $ */ +/* $OpenBSD: if_media.c,v 1.19 2007/12/20 02:53:02 brad Exp $ */ /* $NetBSD: if_media.c,v 1.10 2000/03/13 23:52:39 soren Exp $ */ /*- @@ -339,7 +339,7 @@ ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, struct ifmedia *ifm, } default: - return (EINVAL); + return (ENOTTY); } return (error); diff --git a/sys/net/if_pflog.c b/sys/net/if_pflog.c index 1517563bf1a..e8dd67979af 100644 --- a/sys/net/if_pflog.c +++ b/sys/net/if_pflog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflog.c,v 1.26 2007/10/18 21:58:18 mpf Exp $ */ +/* $OpenBSD: if_pflog.c,v 1.27 2007/12/20 02:53:02 brad Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -198,7 +198,7 @@ pflogioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags &= ~IFF_RUNNING; break; default: - return (EINVAL); + return (ENOTTY); } return (0); diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 5fc313e00a6..ef024f8d4f3 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sl.c,v 1.34 2007/10/13 14:21:01 fgsch Exp $ */ +/* $OpenBSD: if_sl.c,v 1.35 2007/12/20 02:53:02 brad Exp $ */ /* $NetBSD: if_sl.c,v 1.39.4.1 1996/06/02 16:26:31 thorpej Exp $ */ /* @@ -977,7 +977,7 @@ slioctl(ifp, cmd, data) break; default: - error = EINVAL; + error = ENOTTY; } splx(s); return (error); diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 7581b552119..98872dbc3ca 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.90 2007/09/15 16:43:51 henning Exp $ */ +/* $OpenBSD: if_tun.c,v 1.91 2007/12/20 02:53:02 brad Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -515,7 +515,7 @@ tun_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags & IFF_LINK0 ? TUN_LAYER2 : 0); break; default: - error = EINVAL; + error = ENOTTY; } splx(s); return (error); diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index cc6a447440c..b1b727e05d8 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.71 2007/09/15 16:43:51 henning Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.72 2007/12/20 02:53:02 brad Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -649,7 +649,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) vlan_ether_delmulti(ifv, ifr) : EINVAL; break; default: - error = EINVAL; + error = ENOTTY; } return error; } |