forked from Ivasoft/DSView
Print the log about failed to open device
This commit is contained in:
@@ -348,8 +348,8 @@ static int hw_dev_open(struct sr_dev_driver *di, struct sr_dev_inst *sdi)
|
||||
|
||||
ret = libusb_open(dev_handel, &usb->devhdl);
|
||||
if (ret != LIBUSB_SUCCESS){
|
||||
sr_err("%s: Failed to open device: %s, handle:%p",
|
||||
__func__, libusb_error_name(ret), dev_handel);
|
||||
sr_err("%s:%d, Failed to open device: %s, handle:%p",
|
||||
__func__, __LINE__, libusb_error_name(ret), dev_handel);
|
||||
ds_set_last_error(SR_ERR_DEVICE_IS_EXCLUSIVE);
|
||||
return SR_ERR;
|
||||
}
|
||||
|
||||
@@ -105,8 +105,8 @@ SR_PRIV int ezusb_upload_firmware(libusb_device *dev, int configuration,
|
||||
libusb_get_bus_number(dev), libusb_get_device_address(dev));
|
||||
|
||||
if ((ret = libusb_open(dev, &hdl)) < 0) {
|
||||
sr_err("%s: Failed to open device: %s.",
|
||||
__func__, libusb_error_name(ret));
|
||||
sr_err("%s:%d, Failed to open device: %s.",
|
||||
__func__, __LINE__, libusb_error_name(ret));
|
||||
return SR_ERR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user