From: jmatthew Date: Tue, 14 Aug 2018 05:22:21 +0000 (+0000) Subject: return ENOTTY rather than EINVAL to indicate an ioctl hasn't been handled X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=32d99de0a0c4d73cf6cb93ca398515008a52734f;p=openbsd return ENOTTY rather than EINVAL to indicate an ioctl hasn't been handled ok dlg@ deraadt@ kettenis@ --- diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index 3fa06417578..a318139dc0a 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.233 2017/04/08 02:57:24 deraadt Exp $ */ +/* $OpenBSD: ami.c,v 1.234 2018/08/14 05:22:21 jmatthew Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -1606,7 +1606,7 @@ ami_ioctl(struct device *dev, u_long cmd, caddr_t addr) default: AMI_DPRINTF(AMI_D_IOCTL, (" invalid ioctl\n")); - error = EINVAL; + error = ENOTTY; } return (error); diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c index 5f5cc92f866..f57e1e79e46 100644 --- a/sys/dev/ic/gdt_common.c +++ b/sys/dev/ic/gdt_common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gdt_common.c,v 1.63 2014/07/08 17:19:25 deraadt Exp $ */ +/* $OpenBSD: gdt_common.c,v 1.64 2018/08/14 05:22:21 jmatthew Exp $ */ /* * Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved. @@ -1371,7 +1371,7 @@ gdt_ioctl(struct device *dev, u_long cmd, caddr_t addr) default: GDT_DPRINTF(GDT_D_IOCTL, (" invalid ioctl\n")); - error = EINVAL; + error = ENOTTY; } return (error); diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index 57fe533211b..905005d9707 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfi.c,v 1.168 2017/09/08 05:36:52 deraadt Exp $ */ +/* $OpenBSD: mfi.c,v 1.169 2018/08/14 05:22:21 jmatthew Exp $ */ /* * Copyright (c) 2006 Marco Peereboom * @@ -1571,7 +1571,7 @@ mfi_ioctl(struct device *dev, u_long cmd, caddr_t addr) default: DNPRINTF(MFI_D_IOCTL, " invalid ioctl\n"); - error = EINVAL; + error = ENOTTY; } rw_exit_write(&sc->sc_lock); diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index 1234a88f546..16606b98e9f 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.205 2016/08/17 01:02:31 krw Exp $ */ +/* $OpenBSD: mpi.c,v 1.206 2018/08/14 05:22:21 jmatthew Exp $ */ /* * Copyright (c) 2005, 2006, 2009 David Gwynne @@ -3190,7 +3190,7 @@ mpi_ioctl(struct device *dev, u_long cmd, caddr_t addr) default: DNPRINTF(MPI_D_IOCTL, " invalid ioctl\n"); - error = EINVAL; + error = ENOTTY; } rw_exit_write(&sc->sc_lock); diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c index d3ac5475a43..b3bc9c8f056 100644 --- a/sys/dev/pci/mfii.c +++ b/sys/dev/pci/mfii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfii.c,v 1.57 2018/06/08 07:14:02 jmatthew Exp $ */ +/* $OpenBSD: mfii.c,v 1.58 2018/08/14 05:22:21 jmatthew Exp $ */ /* * Copyright (c) 2012 David Gwynne @@ -2737,7 +2737,7 @@ mfii_ioctl(struct device *dev, u_long cmd, caddr_t addr) default: DNPRINTF(MFII_D_IOCTL, " invalid ioctl\n"); - error = EINVAL; + error = ENOTTY; } rw_exit_write(&sc->sc_lock); diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c index 7393dd9c9f1..9f5dd336f78 100644 --- a/sys/dev/pci/mpii.c +++ b/sys/dev/pci/mpii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpii.c,v 1.114 2018/06/19 10:32:41 jmatthew Exp $ */ +/* $OpenBSD: mpii.c,v 1.115 2018/08/14 05:22:21 jmatthew Exp $ */ /* * Copyright (c) 2010, 2012 Mike Belopuhov * Copyright (c) 2009 James Giannoules @@ -3279,7 +3279,7 @@ mpii_ioctl(struct device *dev, u_long cmd, caddr_t addr) break; default: DNPRINTF(MPII_D_IOCTL, " invalid ioctl\n"); - error = EINVAL; + error = ENOTTY; } return (error);