summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/listdevs.c14
-rw-r--r--examples/xusb.c2
-rw-r--r--libusb/version_nano.h2
3 files changed, 7 insertions, 11 deletions
diff --git a/examples/listdevs.c b/examples/listdevs.c
index 05b3998..31ad26e 100644
--- a/examples/listdevs.c
+++ b/examples/listdevs.c
@@ -39,15 +39,11 @@ static void print_devs(libusb_device **devs)
desc.idVendor, desc.idProduct,
libusb_get_bus_number(dev), libusb_get_device_address(dev));
- r = libusb_get_port_path(NULL, dev, path, sizeof(path));
- if (r > 0)
- printf(" path: ");
- j = 0;
- while(j < r) {
- printf("%d", path[j]);
- j++;
- if (j < r)
- printf(".");
+ r = libusb_get_port_numbers(dev, path, sizeof(path));
+ if (r > 0) {
+ printf(" path: %d", path[0]);
+ for (j = 1; j < r; j++)
+ printf(".%d", path[j]);
}
printf("\n");
}
diff --git a/examples/xusb.c b/examples/xusb.c
index 856f723..5bb92a6 100644
--- a/examples/xusb.c
+++ b/examples/xusb.c
@@ -755,7 +755,7 @@ static int test_device(uint16_t vid, uint16_t pid)
dev = libusb_get_device(handle);
bus = libusb_get_bus_number(dev);
if (extra_info) {
- r = libusb_get_port_path(NULL, dev, port_path, sizeof(port_path));
+ r = libusb_get_port_numbers(dev, port_path, sizeof(port_path));
if (r > 0) {
printf("\nDevice properties:\n");
printf(" bus number: %d\n", bus);
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 9cd9c4a..7eaedda 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 10697
+#define LIBUSB_NANO 10698