summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@cvs.openbsd.org>2021-09-15 04:57:48 +0000
committerAnton Lindqvist <anton@cvs.openbsd.org>2021-09-15 04:57:48 +0000
commitb5d6e3cdf451cdac232cfbb91b832ae2ddc536c0 (patch)
tree9e73e8db3197b2d40c5c9bf89ece42b44790b9d2 /sys
parent8276712194ca2d244238cfce6d23721a887d0d4e (diff)
Change the errno to ENOTTY when encountering an unknown ioctl command as
opposed of using EINVAL which is ambiguous in this context. ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/uhid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index 883a65cc264..90a75d878e3 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhid.c,v 1.86 2021/09/12 06:58:08 anton Exp $ */
+/* $OpenBSD: uhid.c,v 1.87 2021/09/15 04:57:47 anton Exp $ */
/* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -392,7 +392,7 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr,
default:
rc = uhidev_ioctl(&sc->sc_hdev, cmd, addr, flag, p);
if (rc == -1)
- rc = EINVAL;
+ rc = ENOTTY;
return rc;
}
return (0);