diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-01-05 07:33:38 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-01-05 07:33:38 +0000 |
commit | 74e91b9bb182eb7392b5a1ff79157c56d867f8af (patch) | |
tree | 1158fb10db5b4a0ecde9613772b7c46e4a9b0bb6 /sys/dev | |
parent | 62f8c7802d974050bc317df642874901a200574e (diff) |
return with ENOTTY instead of EINVAL for unknown ioctl requests.
ok krw@ deraadt@ dlg@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ramdisk.c | 5 | ||||
-rw-r--r-- | sys/dev/softraid.c | 4 | ||||
-rw-r--r-- | sys/dev/systrace.c | 6 |
3 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c index c193d5c3351..7ed9a4b78c2 100644 --- a/sys/dev/ramdisk.c +++ b/sys/dev/ramdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ramdisk.c,v 1.39 2007/09/11 13:39:33 gilles Exp $ */ +/* $OpenBSD: ramdisk.c,v 1.40 2008/01/05 07:33:37 brad Exp $ */ /* $NetBSD: ramdisk.c,v 1.8 1996/04/12 08:30:09 leo Exp $ */ /* @@ -484,6 +484,9 @@ rdioctl(dev, cmd, data, flag, proc) break; } break; + + default: + return ENOTTY; } return EINVAL; } diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index ddfef49b72b..af5cfd1b5dc 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.89 2007/11/27 17:21:52 tedu Exp $ */ +/* $OpenBSD: softraid.c,v 1.90 2008/01/05 07:33:37 brad Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * @@ -566,7 +566,7 @@ sr_ioctl(struct device *dev, u_long cmd, caddr_t addr) default: DNPRINTF(SR_D_IOCTL, "invalid ioctl\n"); - rv = EINVAL; + rv = ENOTTY; } rw_exit_write(&sc->sc_lock); diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c index c46227b9c6e..9bce33ffe02 100644 --- a/sys/dev/systrace.c +++ b/sys/dev/systrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: systrace.c,v 1.46 2007/09/11 13:39:33 gilles Exp $ */ +/* $OpenBSD: systrace.c,v 1.47 2008/01/05 07:33:37 brad Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -324,7 +324,7 @@ systracef_ioctl(fp, cmd, data, p) ret = EINVAL; break; default: - ret = EINVAL; + ret = ENOTTY; break; } @@ -399,7 +399,7 @@ systracef_ioctl(fp, cmd, data, p) ret = systrace_getcwd(fst, strp); break; default: - ret = EINVAL; + ret = ENOTTY; break; } |