BSD: Provide libusb_get_device_speed() data
authorMartin Pieuchot <mpi@openbsd.org>
Thu, 19 Apr 2012 09:33:36 +0000 (11:33 +0200)
committerPete Batard <pete@akeo.ie>
Fri, 20 Apr 2012 21:39:47 +0000 (22:39 +0100)
Because the different speed values used by the libusb and OpenBSD's
usb_device_info structure are compatible, keep the code simple and
just copy the value returned by the USB_GET_DEVICEINFO ioctl() call.

libusb/os/openbsd_usb.c
libusb/version.h

index 9958cfe..9f909aa 100644 (file)
@@ -165,6 +165,7 @@ obsd_get_device_list(struct libusb_context * ctx,
 
                        dev->bus_number = di.udi_bus;
                        dev->device_address = di.udi_addr;
+                       dev->speed = di.udi_speed;
 
                        dpriv = (struct device_priv *)dev->os_priv;
                        strlcpy(dpriv->devnode, devnode, sizeof(devnode));
index 6a8b151..2ebe01f 100644 (file)
@@ -9,7 +9,7 @@
 #define LIBUSB_MICRO 10
 #endif
 #ifndef LIBUSB_NANO
-#define LIBUSB_NANO 10482
+#define LIBUSB_NANO 10483
 #endif
 /* LIBUSB_RC is the release candidate suffix. Should normally be empty. */
 #ifndef LIBUSB_RC