From owner-freebsd-usb@FreeBSD.ORG Fri Dec 21 03:30:03 2007 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7767F16A417 for ; Fri, 21 Dec 2007 03:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6CF0113C44B for ; Fri, 21 Dec 2007 03:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id lBL3U2Au056192 for ; Fri, 21 Dec 2007 03:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lBL3U2h5056187; Fri, 21 Dec 2007 03:30:02 GMT (envelope-from gnats) Date: Fri, 21 Dec 2007 03:30:02 GMT Message-Id: <200712210330.lBL3U2h5056187@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Maurice Castro Cc: Subject: Re: usb/118915: usbhidctl appears to not report features and write size correctly X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Maurice Castro List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Dec 2007 03:30:03 -0000 The following reply was made to PR usb/118915; it has been noted by GNATS. From: Maurice Castro To: bug-followup@FreeBSD.org, Maurice Castro Cc: Subject: Re: usb/118915: usbhidctl appears to not report features and write size correctly Date: Fri, 21 Dec 2007 14:07:26 +1100 --Apple-Mail-1-855914301 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Update to patch as the hid_report_size function is used inconsistently with the documentation in another spot: --Apple-Mail-1-855914301 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=usbhidctl.diff Content-Disposition: attachment; filename=usbhidctl.diff --- /usr/src/usr.bin/usbhidctl/usbhid.c Mon May 26 14:58:26 2003 +++ ./usbhid.c Fri Dec 21 13:21:19 2007 @@ -148,13 +148,13 @@ } } hid_end_parse(d); - size = hid_report_size(r, 0, hid_input); + size = hid_report_size(r, hid_input, 0); printf("Total input size %d bytes\n", size); - size = hid_report_size(r, 0, hid_output); + size = hid_report_size(r, hid_output, 0); printf("Total output size %d bytes\n", size); - size = hid_report_size(r, 0, hid_feature); + size = hid_report_size(r, hid_feature, 0); printf("Total feature size %d bytes\n", size); } @@ -219,7 +219,7 @@ } hid_end_parse(d); rev(&hids); - dlen = hid_report_size(rd, 0, hid_input); + dlen = hid_report_size(rd, hid_input, 0); dbuf = malloc(dlen); if (!loop) if (ioctl(f, USB_SET_IMMED, &one) < 0) { --Apple-Mail-1-855914301--