mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-19 14:58:35 +03:00
host: Allow matching of device to USB path, not just address
USB addresses change every time the device re-enumerates, while the path reflects the physical topology of USB connections and stays persistent unless the usb cabling is changed. Let's allow the user to specify the path instead of the address to uniquely identify a given slot.
This commit is contained in:
@@ -41,8 +41,8 @@ static int find_devices(void)
|
||||
libusb_device_handle *dev_handle;
|
||||
char strbuf[256];
|
||||
|
||||
printf("\t%04x:%04x Addr=%u, Cfg=%u, Intf=%u, Alt=%u: %d/%d/%d ",
|
||||
m->vendor, m->product, m->addr,
|
||||
printf("\t%04x:%04x Addr=%u, Path=%s, Cfg=%u, Intf=%u, Alt=%u: %d/%d/%d ",
|
||||
m->vendor, m->product, m->addr, m->path,
|
||||
m->configuration, m->interface, m->altsetting,
|
||||
m->class, m->sub_class, m->protocol);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user