diff options
author | Daniel Drake <dsd@gentoo.org> | 2008-05-02 12:28:31 +0100 |
---|---|---|
committer | Daniel Drake <dsd@gentoo.org> | 2008-05-02 12:28:31 +0100 |
commit | 3675e978fb7a1042f8601931255658bcd14a2298 (patch) | |
tree | 8f5a27995d4e1bf763507b5f3194fd8f8e8f985d /examples | |
parent | 2012898ffc492317cb428d97077bf5ee0e98e1da (diff) | |
download | libusb-3675e978fb7a1042f8601931255658bcd14a2298.tar.gz |
Expose bus number and device address
Diffstat (limited to 'examples')
-rw-r--r-- | examples/lsusb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/lsusb.c b/examples/lsusb.c index f196c85..9aad2bf 100644 --- a/examples/lsusb.c +++ b/examples/lsusb.c @@ -29,7 +29,9 @@ void print_devs(libusb_device **devs) while ((dev = devs[i++]) != NULL) { const struct libusb_device_descriptor *desc = libusb_get_device_descriptor(dev); - printf("%04x:%04x\n", desc->idVendor, desc->idProduct); + printf("%04x:%04x (bus %d, device %d)\n", + desc->idVendor, desc->idProduct, + libusb_get_bus_number(dev), libusb_get_device_address(dev)); } } |