From nobody@FreeBSD.org Mon Nov 1 01:18:59 2010 Return-Path: Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3528A1065670 for ; Mon, 1 Nov 2010 01:18:59 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 096548FC12 for ; Mon, 1 Nov 2010 01:18:59 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id oA11Iwl6098490 for ; Mon, 1 Nov 2010 01:18:58 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id oA11IwKO098488; Mon, 1 Nov 2010 01:18:58 GMT (envelope-from nobody) Message-Id: <201011010118.oA11IwKO098488@www.freebsd.org> Date: Mon, 1 Nov 2010 01:18:58 GMT From: HIROSHI OOTA To: freebsd-gnats-submit@FreeBSD.org Subject: libusb(3) libusb_control_transfer() return value is incorrect X-Send-Pr-Version: www-3.1 X-GNATS-Notify: >Number: 151851 >Category: usb >Synopsis: [libusb] libusb(3) libusb_control_transfer() return value is incorrect >Confidential: no >Severity: non-critical >Priority: low >Responsible: hselasky >State: closed >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Mon Nov 01 01:20:08 UTC 2010 >Closed-Date: Sun Jul 24 22:39:33 UTC 2011 >Last-Modified: Sun Jul 24 22:39:33 UTC 2011 >Originator: HIROSHI OOTA >Release: 9-current >Organization: >Environment: FreeBSD aries 9.0-CURRENT FreeBSD 9.0-CURRENT #102 r214602M: Mon Nov 1 03:06:42 JST 2010 root@localhost amd64 >Description: In the libusb(3) man page the return value of libusb_control_transfer is: > Returns 0 on success but, it's returns the number of bytes actually transferred. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: From: Hans Petter Selasky To: freebsd-usb@freebsd.org Cc: HIROSHI OOTA , freebsd-gnats-submit@freebsd.org Subject: Re: usb/151851: libusb(3) libusb_control_transfer() return value is incorrect Date: Mon, 1 Nov 2010 09:43:02 +0100 On Monday 01 November 2010 02:18:58 HIROSHI OOTA wrote: > >Number: 151851 > >Category: usb > >Synopsis: libusb(3) libusb_control_transfer() return value is > >incorrect Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: doc-bug > >Submitter-Id: current-users > >Arrival-Date: Mon Nov 01 01:20:08 UTC 2010 > >Closed-Date: > >Last-Modified: > >Originator: HIROSHI OOTA > >Release: 9-current > >Organization: > > >Environment: > FreeBSD aries 9.0-CURRENT FreeBSD 9.0-CURRENT #102 r214602M: Mon Nov 1 > 03:06:42 JST 2010 root@localhost amd64 > > >Description: > In the libusb(3) man page the return value of libusb_control_transfer is: > > Returns 0 on success > > but, it's returns the number of bytes actually transferred. > > >How-To-Repeat: > > > >Fix: > > > > > >Release-Note: > >Audit-Trail: > > >Unformatted: See USB P4 change 185296. --HPS Responsible-Changed-From-To: freebsd-usb->hselasky Responsible-Changed-By: arundel Responsible-Changed-When: Wed Nov 17 12:14:45 UTC 2010 Responsible-Changed-Why: Hans Petter, could you please do a MfP4 of this commit to HEAD? http://www.freebsd.org/cgi/query-pr.cgi?pr=151851 From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/151851: commit references a PR Date: Thu, 18 Nov 2010 08:32:52 +0000 (UTC) Author: hselasky Date: Thu Nov 18 08:32:47 2010 New Revision: 215450 URL: http://svn.freebsd.org/changeset/base/215450 Log: Correct description of the return values of the LibUSB v1.0 libusb_control_transfer() function. PR: usb/151851 Submitted by: HIROSHI OOTA Approved by: thompsa (mentor) Modified: head/lib/libusb/libusb.3 Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Thu Nov 18 08:03:40 2010 (r215449) +++ head/lib/libusb/libusb.3 Thu Nov 18 08:32:47 2010 (r215450) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2010 +.Dd November 18, 2010 .Dt LIBUSB 3 .Os .Sh NAME @@ -380,10 +380,15 @@ LIBUSB_ERROR code on failure. .Pp .Ft int .Fn libusb_control_transfer "libusb_device_handle *devh" "uint8_t bmRequestType" "uint8_t bRequest" "uint16_t wValue" "uint16_t wIndex" "unsigned char *data" "uint16_t wLength" "unsigned int timeout" -Perform a USB control transfer. Returns 0 on success, LIBUSB_ERROR_TIMEOUT -if the transfer timeout, LIBUSB_ERROR_PIPE if the control request was not -supported, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and -LIBUSB_ERROR code on other failure. +Perform a USB control transfer. Returns the actual number of bytes +transferred on success in the range from and including zero until and +including +.Xa wLength . +On error a libusb error code is returned, for example +LIBUSB_ERROR_TIMEOUT if the transfer timeout, LIBUSB_ERROR_PIPE if the +control request was not supported, LIBUSB_ERROR_NO_DEVICE if the +device has been disconnected or another LIBUSB_ERROR code on other failures. +The libusb error codes are always negative. . .Pp .Ft int _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State-Changed-From-To: open->patched State-Changed-By: arundel State-Changed-When: Fri Nov 19 13:34:15 UTC 2010 State-Changed-Why: Fixed in HEAD (r215450). http://www.freebsd.org/cgi/query-pr.cgi?pr=151851 From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/151851: commit references a PR Date: Sun, 28 Nov 2010 07:19:16 +0000 (UTC) Author: thompsa Date: Sun Nov 28 07:19:11 2010 New Revision: 215984 URL: http://svn.freebsd.org/changeset/base/215984 Log: MFC r215450 Correct description of the return values of the LibUSB v1.0 libusb_control_transfer() function. PR: usb/151851 Modified: stable/8/lib/libusb/libusb.3 Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/libusb.3 ============================================================================== --- stable/8/lib/libusb/libusb.3 Sun Nov 28 07:18:14 2010 (r215983) +++ stable/8/lib/libusb/libusb.3 Sun Nov 28 07:19:11 2010 (r215984) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2010 +.Dd November 18, 2010 .Dt LIBUSB 3 .Os .Sh NAME @@ -380,10 +380,15 @@ LIBUSB_ERROR code on failure. .Pp .Ft int .Fn libusb_control_transfer "libusb_device_handle *devh" "uint8_t bmRequestType" "uint8_t bRequest" "uint16_t wValue" "uint16_t wIndex" "unsigned char *data" "uint16_t wLength" "unsigned int timeout" -Perform a USB control transfer. Returns 0 on success, LIBUSB_ERROR_TIMEOUT -if the transfer timeout, LIBUSB_ERROR_PIPE if the control request was not -supported, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and -LIBUSB_ERROR code on other failure. +Perform a USB control transfer. Returns the actual number of bytes +transferred on success in the range from and including zero until and +including +.Xa wLength . +On error a libusb error code is returned, for example +LIBUSB_ERROR_TIMEOUT if the transfer timeout, LIBUSB_ERROR_PIPE if the +control request was not supported, LIBUSB_ERROR_NO_DEVICE if the +device has been disconnected or another LIBUSB_ERROR code on other failures. +The libusb error codes are always negative. . .Pp .Ft int _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State-Changed-From-To: patched->closed State-Changed-By: eadler State-Changed-When: Sun Jul 24 22:39:32 UTC 2011 State-Changed-Why: patched and MFCed http://www.freebsd.org/cgi/query-pr.cgi?pr=151851 >Unformatted: