artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75d4f95
)
Change the errno to ENOTTY when encountering an unknown ioctl command as
author
anton
<anton@openbsd.org>
Wed, 15 Sep 2021 04:57:47 +0000
(
04:57
+0000)
committer
anton
<anton@openbsd.org>
Wed, 15 Sep 2021 04:57:47 +0000
(
04:57
+0000)
opposed of using EINVAL which is ambiguous in this context.
ok deraadt@
sys/dev/usb/uhid.c
patch
|
blob
|
history
diff --git
a/sys/dev/usb/uhid.c
b/sys/dev/usb/uhid.c
index
883a65c
..
90a75d8
100644
(file)
--- a/
sys/dev/usb/uhid.c
+++ b/
sys/dev/usb/uhid.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: uhid.c,v 1.8
6 2021/09/12 06:58:08
anton Exp $ */
+/* $OpenBSD: uhid.c,v 1.8
7 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 = E
INVAL
;
+ rc = E
NOTTY
;
return rc;
}
return (0);