From owner-svn-src-stable@FreeBSD.ORG Mon May 17 23:56:17 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DF881065690; Mon, 17 May 2010 23:56:17 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CE588FC25; Mon, 17 May 2010 23:56:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4HNuH13077654; Mon, 17 May 2010 23:56:17 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4HNuHIs077652; Mon, 17 May 2010 23:56:17 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005172356.o4HNuHIs077652@svn.freebsd.org> From: Andrew Thompson Date: Mon, 17 May 2010 23:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r208235 - stable/8/lib/libusb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 23:56:17 -0000 Author: thompsa Date: Mon May 17 23:56:17 2010 New Revision: 208235 URL: http://svn.freebsd.org/changeset/base/208235 Log: MFC r208021 Fix return values for usb_find_busses() and usb_find_devices(). We should try to return the actual number of busses and devices. Modified: stable/8/lib/libusb/libusb20_compat01.c Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/libusb20_compat01.c ============================================================================== --- stable/8/lib/libusb/libusb20_compat01.c Mon May 17 23:55:38 2010 (r208234) +++ stable/8/lib/libusb/libusb20_compat01.c Mon May 17 23:56:17 2010 (r208235) @@ -820,7 +820,7 @@ int usb_find_busses(void) { usb_busses = &usb_global_bus; - return (0); + return (1); } int @@ -904,7 +904,7 @@ usb_find_devices(void) LIST_ADD(usb_global_bus.devices, udev); } - return (0); /* success */ + return (devnum - 1); /* success */ } struct usb_device *