From owner-svn-src-head@FreeBSD.ORG Fri Jun 7 13:45:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 38FBF394; Fri, 7 Jun 2013 13:45:59 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 11BCF1FE1; Fri, 7 Jun 2013 13:45:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r57Djwf2019778; Fri, 7 Jun 2013 13:45:58 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r57Djwub019775; Fri, 7 Jun 2013 13:45:58 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201306071345.r57Djwub019775@svn.freebsd.org> From: Ed Maste Date: Fri, 7 Jun 2013 13:45:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251495 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jun 2013 13:45:59 -0000 Author: emaste Date: Fri Jun 7 13:45:58 2013 New Revision: 251495 URL: http://svnweb.freebsd.org/changeset/base/251495 Log: Add libusb_get_port_numbers libusbx deprecated libusb_get_port_path and replaced it with libusb_get_port_numbers. The latter omits an extra parameter which was unused in the FreeBSD implementation anyway. Modified: head/lib/libusb/libusb.3 head/lib/libusb/libusb.h head/lib/libusb/libusb10.c Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Fri Jun 7 13:30:59 2013 (r251494) +++ head/lib/libusb/libusb.3 Fri Jun 7 13:45:58 2013 (r251495) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 7, 2013 +.Dd June 7, 2013 .Dt LIBUSB 3 .Os .Sh NAME @@ -103,7 +103,7 @@ Returns the number of the bus contained .Fa dev . .Pp .Ft int -.Fn libusb_get_port_path "libusb_context *ctx" "libusb_device *dev" "uint8_t *buf" "uint8_t bufsize" +.Fn libusb_get_port_numbers "libusb_device *dev" "uint8_t *buf" "uint8_t bufsize" Stores, in the buffer .Fa buf of size @@ -111,6 +111,10 @@ of size the list of all port numbers from root for the device .Fa dev . .Pp +.Ft int +.Fn libusb_get_port_path "libusb_context *ctx" "libusb_device *dev" "uint8_t *buf" "uint8_t bufsize" +Deprecated function equivalent to libusb_get_port_numbers. +.Pp .Ft uint8_t .Fn libusb_get_device_address "libusb_device *dev" Returns the device_address contained by the device Modified: head/lib/libusb/libusb.h ============================================================================== --- head/lib/libusb/libusb.h Fri Jun 7 13:30:59 2013 (r251494) +++ head/lib/libusb/libusb.h Fri Jun 7 13:45:58 2013 (r251495) @@ -369,6 +369,7 @@ void libusb_exit(struct libusb_context * ssize_t libusb_get_device_list(libusb_context * ctx, libusb_device *** list); void libusb_free_device_list(libusb_device ** list, int unref_devices); uint8_t libusb_get_bus_number(libusb_device * dev); +int libusb_get_port_numbers(libusb_device *dev, uint8_t *buf, uint8_t bufsize); int libusb_get_port_path(libusb_context *ctx, libusb_device *dev, uint8_t *buf, uint8_t bufsize); uint8_t libusb_get_device_address(libusb_device * dev); enum libusb_speed libusb_get_device_speed(libusb_device * dev); Modified: head/lib/libusb/libusb10.c ============================================================================== --- head/lib/libusb/libusb10.c Fri Jun 7 13:30:59 2013 (r251494) +++ head/lib/libusb/libusb10.c Fri Jun 7 13:45:58 2013 (r251495) @@ -291,6 +291,12 @@ libusb_get_bus_number(libusb_device *dev } int +libusb_get_port_numbers(libusb_device *dev, uint8_t *buf, uint8_t bufsize) +{ + return (libusb20_dev_get_port_path(dev->os_priv, buf, bufsize)); +} + +int libusb_get_port_path(libusb_context *ctx, libusb_device *dev, uint8_t *buf, uint8_t bufsize) {