]> sigrok.org Git - libsigrok.git/commitdiff
hardware: A few further USB error message fixups
authorPeter Stuge <redacted>
Wed, 5 Dec 2012 00:23:49 +0000 (01:23 +0100)
committerPeter Stuge <redacted>
Wed, 5 Dec 2012 00:34:15 +0000 (01:34 +0100)
hardware/common/ezusb.c
hardware/hantek-dso/dso.c

index 947fe1f834c1d7662c3a791a153c2aabdaafe8b5..77817a71bc36c1bc0f9307087ad5232ff11054ed 100644 (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;
        }
 
index 853bab340146ce2bb34eefa4cb3d12b5de203fcd..c60496e783a79f01d3307fa15aaef61041d96a34 100644 (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;
        }