diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-02-27 15:30:42 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-02-27 15:30:42 +0000 |
commit | 1e203e5f958401cf69aab17cf6cca4b66b7456de (patch) | |
tree | ad8192da8a085dfc80e606e37adca6894804cc95 /lib/libusbhid | |
parent | df2be82cecfdcfe4fe66cafe9b35f2eb7121b532 (diff) | |
download | FreeBSD-src-1e203e5f958401cf69aab17cf6cca4b66b7456de.zip FreeBSD-src-1e203e5f958401cf69aab17cf6cca4b66b7456de.tar.gz |
Fix HID_COMPAT7 handling around the USB_GET_REPORT_DESC ioctl.
Submitted by: daichi
Pointy hat: me
Diffstat (limited to 'lib/libusbhid')
-rw-r--r-- | lib/libusbhid/descr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libusbhid/descr.c b/lib/libusbhid/descr.c index 0ae383f..b1a081d 100644 --- a/lib/libusbhid/descr.c +++ b/lib/libusbhid/descr.c @@ -85,13 +85,15 @@ hid_get_report_desc(int fd) /* get actual length first */ ugd.ugd_data = NULL; ugd.ugd_maxlen = 65535; -#ifdef HID_COMPAT7 if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) { +#ifdef HID_COMPAT7 /* could not read descriptor */ /* try FreeBSD 7 compat code */ return (hid_get_report_desc_compat7(fd)); - } +#else + return (NULL); #endif + } /* * NOTE: The kernel will return a failure if |