hardware: A few further USB error message fixups

This commit is contained in:
Peter Stuge 2012-12-05 01:23:49 +01:00
parent d4928d7102
commit 1740429d70
2 changed files with 9 additions and 16 deletions

View File

@ -50,7 +50,7 @@ SR_PRIV int ezusb_reset(struct libusb_device_handle *hdl, int set_clear)
ret = libusb_control_transfer(hdl, LIBUSB_REQUEST_TYPE_VENDOR, 0xa0,
0xe600, 0x0000, buf, 1, 100);
if (ret < 0)
sr_err("Unable to send control request: %s",
sr_err("Unable to send control request: %s.",
libusb_error_name(ret));
return ret;
@ -80,7 +80,7 @@ SR_PRIV int ezusb_install_firmware(libusb_device_handle *hdl,
LIBUSB_ENDPOINT_OUT, 0xa0, offset,
0x0000, buf, chunksize, 100);
if (ret < 0) {
sr_err("Unable to send firmware to device: %s",
sr_err("Unable to send firmware to device: %s.",
libusb_error_name(ret));
result = SR_ERR;
break;
@ -104,8 +104,7 @@ 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("ezusb: failed to open device: %s",
libusb_error_name(ret));
sr_err("failed to open device: %s.", libusb_error_name(ret));
return SR_ERR;
}

View File

@ -393,8 +393,7 @@ SR_PRIV int dso_set_filters(struct dev_context *devc)
DSO_EP_OUT | LIBUSB_ENDPOINT_OUT,
cmdstring, sizeof(cmdstring),
&tmp, 100)) != 0) {
sr_err("Failed to set filters: %s",
libusb_error_name(ret));
sr_err("Failed to set filters: %s.", libusb_error_name(ret));
return SR_ERR;
}
sr_dbg("Sent CMD_SET_FILTERS.");
@ -461,8 +460,7 @@ SR_PRIV int dso_set_voltage(struct dev_context *devc)
DSO_EP_OUT | LIBUSB_ENDPOINT_OUT,
cmdstring, sizeof(cmdstring),
&tmp, 100)) != 0) {
sr_err("Failed to set voltage: %s.",
libusb_error_name(ret));
sr_err("Failed to set voltage: %s.", libusb_error_name(ret));
return SR_ERR;
}
sr_dbg("Sent CMD_SET_VOLTAGE.");
@ -514,8 +512,7 @@ SR_PRIV int dso_set_relays(struct dev_context *devc)
if ((ret = libusb_control_transfer(devc->usb->devhdl,
LIBUSB_REQUEST_TYPE_VENDOR, CTRL_SETRELAYS,
0, 0, relays, 17, 100)) != sizeof(relays)) {
sr_err("Failed to set relays: %s.",
libusb_error_name(ret));
sr_err("Failed to set relays: %s.", libusb_error_name(ret));
return SR_ERR;
}
sr_dbg("Sent CTRL_SETRELAYS.");
@ -558,8 +555,7 @@ SR_PRIV int dso_set_voffsets(struct dev_context *devc)
if ((ret = libusb_control_transfer(devc->usb->devhdl,
LIBUSB_REQUEST_TYPE_VENDOR, CTRL_SETOFFSET,
0, 0, offsets, sizeof(offsets), 100)) != sizeof(offsets)) {
sr_err("Failed to set offsets: %s.",
libusb_error_name(ret));
sr_err("Failed to set offsets: %s.", libusb_error_name(ret));
return SR_ERR;
}
sr_dbg("Sent CTRL_SETOFFSET.");
@ -585,8 +581,7 @@ SR_PRIV int dso_enable_trigger(struct dev_context *devc)
DSO_EP_OUT | LIBUSB_ENDPOINT_OUT,
cmdstring, sizeof(cmdstring),
&tmp, 100)) != 0) {
sr_err("Failed to enable trigger: %s.",
libusb_error_name(ret));
sr_err("Failed to enable trigger: %s.", libusb_error_name(ret));
return SR_ERR;
}
@ -611,8 +606,7 @@ SR_PRIV int dso_force_trigger(struct dev_context *devc)
DSO_EP_OUT | LIBUSB_ENDPOINT_OUT,
cmdstring, sizeof(cmdstring),
&tmp, 100)) != 0) {
sr_err("Failed to force trigger: %s.",
libusb_error_name(ret));
sr_err("Failed to force trigger: %s.", libusb_error_name(ret));
return SR_ERR;
}