Hi,
Change the errno to ENOTTY when encountering an unknown ioctl command as
opposed of using EINVAL which is ambiguous in this context.
Comments? OK?
Index: dev/usb/uhid.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uhid.c,v
retrieving revision 1.86
diff -u -p -r1.86 uhid.c
--- dev/usb/uhid.c 12 Sep 2021 06:58:08 -0000 1.86
+++ dev/usb/uhid.c 14 Sep 2021 16:49:33 -0000
@@ -392,7 +392,7 @@ uhid_do_ioctl(struct uhid_softc *sc, u_l
default:
rc = uhidev_ioctl(&sc->sc_hdev, cmd, addr, flag, p);
if (rc == -1)
- rc = EINVAL;
+ rc = ENOTTY;
return rc;
}
return (0);