mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
host: Print strerror(errno) in case of problems opening the USB device
Change-Id: If446bf08655739281f616df952714751fe9a3b18
This commit is contained in:
@@ -561,7 +561,7 @@ int main(int argc, char **argv)
|
||||
transp->usb_async = true;
|
||||
transp->usb_devh = osmo_libusb_open_claim_interface(NULL, NULL, ifm);
|
||||
if (!transp->usb_devh) {
|
||||
fprintf(stderr, "can't open USB device\n");
|
||||
fprintf(stderr, "can't open USB device: %s\n", strerror(errno));
|
||||
goto close;
|
||||
}
|
||||
|
||||
|
||||
@@ -472,7 +472,7 @@ int main(int argc, char **argv)
|
||||
do {
|
||||
_transp.usb_devh = osmo_libusb_open_claim_interface(NULL, NULL, &ifm_selected);
|
||||
if (!_transp.usb_devh) {
|
||||
fprintf(stderr, "can't open USB device\n");
|
||||
fprintf(stderr, "can't open USB device: %s\n", strerror(errno));
|
||||
goto close_exit;
|
||||
}
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ int main(int argc, char **argv)
|
||||
osmo_strlcpy(ifm->path, path, sizeof(ifm->path));
|
||||
transp->usb_devh = osmo_libusb_open_claim_interface(NULL, NULL, ifm);
|
||||
if (!transp->usb_devh) {
|
||||
fprintf(stderr, "can't open USB device\n");
|
||||
fprintf(stderr, "can't open USB device: %s\n", strerror(errno));
|
||||
goto close_exit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user