svn commit: r251495 - head/lib/libusb
Ed Maste
emaste at FreeBSD.org
Fri Jun 7 13:45:59 UTC 2013
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)
{
More information about the svn-src-all
mailing list