hosted/find_debuggers: Do not check hubs. Print class of devices unable to open.

This commit is contained in:
Uwe Bonnes 2020-10-25 12:39:41 +01:00 committed by UweBonnes
parent e68dd25813
commit 824a1d8abc
1 changed files with 6 additions and 2 deletions

View File

@ -111,12 +111,16 @@ static int find_debuggers( BMP_CL_OPTIONS_t *cl_opts,bmp_info_t *info)
libusb_free_device_list(devs, 1);
continue;
}
/* Exclude hubs from testing. Probably more classes could be excluded here!*/
if (desc.bDeviceClass == LIBUSB_CLASS_HUB) {
continue;
}
libusb_device_handle *handle;
res = libusb_open(dev, &handle);
if (res != LIBUSB_SUCCESS) {
if (!access_problems) {
DEBUG_INFO("INFO: Open USB %04x:%04x failed\n",
desc.idVendor, desc.idProduct);
DEBUG_INFO("INFO: Open USB %04x:%04x class %2x failed\n",
desc.idVendor, desc.idProduct, desc.bDeviceClass);
access_problems = true;
}
continue;