Date: Fri, 27 Feb 2009 15:30:42 +0000 (UTC) From: Andrew Thompson <thompsa@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r189108 - head/lib/libusbhid Message-ID: <200902271530.n1RFUgP1074100@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: thompsa Date: Fri Feb 27 15:30:42 2009 New Revision: 189108 URL: http://svn.freebsd.org/changeset/base/189108 Log: Fix HID_COMPAT7 handling around the USB_GET_REPORT_DESC ioctl. Submitted by: daichi Pointy hat: me Modified: head/lib/libusbhid/descr.c Modified: head/lib/libusbhid/descr.c ============================================================================== --- head/lib/libusbhid/descr.c Fri Feb 27 15:25:47 2009 (r189107) +++ head/lib/libusbhid/descr.c Fri Feb 27 15:30:42 2009 (r189108) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902271530.n1RFUgP1074100>