A patch: fixed mistaken libusbhid change

From: Daichi GOTO <daichi_at_ongs.co.jp>
Date: Fri, 27 Feb 2009 15:11:24 +0900
Hi USB2 folks,

I have found libusbhid has been changed with
mistaken patch. I have made a fix patch included.
Please check that, consider and merge and commit!

Thanks :)

-- 
   Daichi GOTO, http://people.freebsd.org/~daichi


--- lib/libusbhid/descr.c.orig	2009-02-24 03:36:54.000000000 +0900
+++ lib/libusbhid/descr.c	2009-02-27 14:55:50.000000000 +0900
_at__at_ -85,13 +85,15 _at__at_
 	/* 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 
Received on Fri Feb 27 2009 - 05:11:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:42 UTC