Fix HID_COMPAT7 handling around the USB_GET_REPORT_DESC ioctl.

Submitted by:	daichi
Pointy hat:	me
This commit is contained in:
Andrew Thompson 2009-02-27 15:30:42 +00:00
parent 33553d6e99
commit e35ceb121b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=189108

View file

@ -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