From owner-freebsd-usb@FreeBSD.ORG Fri Dec 21 02:40:00 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 EA68316A418 for ; Fri, 21 Dec 2007 02:40:00 +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 B5E8E13C467 for ; Fri, 21 Dec 2007 02:40:00 +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 lBL2e026022034 for ; Fri, 21 Dec 2007 02:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lBL2e0gC022033; Fri, 21 Dec 2007 02:40:00 GMT (envelope-from gnats) Resent-Date: Fri, 21 Dec 2007 02:40:00 GMT Resent-Message-Id: <200712210240.lBL2e0gC022033@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Maurice Castro Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A641916A419 for ; Fri, 21 Dec 2007 02:31:09 +0000 (UTC) (envelope-from maurice@atum.castro.aus.net) Received: from atum.castro.aus.net (atum.castro.aus.net [202.147.99.226]) by mx1.freebsd.org (Postfix) with ESMTP id 2764B13C44B for ; Fri, 21 Dec 2007 02:31:08 +0000 (UTC) (envelope-from maurice@atum.castro.aus.net) Received: from atum.castro.aus.net (localhost.castro.aus.net [127.0.0.1]) by atum.castro.aus.net (8.13.8/8.13.8) with ESMTP id lBL2Jrgc044327 for ; Fri, 21 Dec 2007 13:19:53 +1100 (EST) (envelope-from maurice@atum.castro.aus.net) Received: (from maurice@localhost) by atum.castro.aus.net (8.13.8/8.13.8/Submit) id lBL2JqKY044326; Fri, 21 Dec 2007 13:19:52 +1100 (EST) (envelope-from maurice) Message-Id: <200712210219.lBL2JqKY044326@atum.castro.aus.net> Date: Fri, 21 Dec 2007 13:19:52 +1100 (EST) From: Maurice Castro To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: 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 02:40:01 -0000 >Number: 118915 >Category: usb >Synopsis: usbhidctl appears to not report features and write size correctly >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Dec 21 02:40:00 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Maurice Castro >Release: FreeBSD 6.2-RELEASE i386 >Organization: >Environment: System: FreeBSD atum.castro.aus.net 6.2-RELEASE FreeBSD 6.2-RELEASE #3: Fri Nov 9 12:40:40 EST 2007 root@atum2.castro.aus.net:/usr/src/sys/i386/compile/ATUM i386 FreeBSD all versions >Description: system utility usbhidctl does not use hid_report_size as per documentation (arguments 2 and 3 are transposed) appears to report incorrect values in output >How-To-Repeat: >Fix: --- /usr/src/usr.bin/usbhidctl/usbhid.c Mon May 26 14:58:26 2003 +++ ./usbhid.c Fri Dec 21 13:12:08 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); } >Release-Note: >Audit-Trail: >Unformatted: