jtag: xds110: Add libusb_open() result to error log
When not having access to the usb devices, but using the xds110, the issue is that one first has to spend time to find the problem. The additional error message helps others at finding this issue faster. Solution: "xds110.c:378 usb_connect(): libusb_open(): LIBUSB_ERROR_ACCESS" Change-Id: Ic59e29d4dd06868920c2b912e4c866d4f176a563 Signed-off-by: Lucien Dufour <lucien.buchmann@dufour.aero> Reviewed-on: https://review.openocd.org/c/openocd/+/9265 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
e440b0648f
commit
57a0e31389
@@ -373,6 +373,9 @@ static bool usb_connect(void)
|
||||
/* If we fall though to here, we don't want this device */
|
||||
libusb_close(dev);
|
||||
dev = NULL;
|
||||
} else {
|
||||
const char *err_msg = libusb_error_name(result);
|
||||
LOG_ERROR("libusb_open(): %s", err_msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user