]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hantek-6xxx/api.c
saleae and other FX2: show firmware name when loading fails
[libsigrok.git] / src / hardware / hantek-6xxx / api.c
index d94ee45d3fecdf196a494ea1aa569dc243f2328b..59b27c2c666163e397e3eb97c0e8cc4dc01e779f 100644 (file)
@@ -228,11 +228,12 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                                devices = g_slist_append(devices, sdi);
                                devc = sdi->priv;
                                if (ezusb_upload_firmware(drvc->sr_ctx, devlist[i],
-                                               USB_CONFIGURATION, prof->firmware) == SR_OK)
+                                               USB_CONFIGURATION, prof->firmware) == SR_OK) {
                                        /* Remember when the firmware on this device was updated. */
                                        devc->fw_updated = g_get_monotonic_time();
-                               else
-                                       sr_err("Firmware upload failed.");
+                               } else {
+                                       sr_err("Firmware upload failed, name %s.", prof->firmware);
+                               }
                                /* Dummy USB address of 0xff will get overwritten later. */
                                sdi->conn = sr_usb_dev_inst_new(
                                                libusb_get_bus_number(devlist[i]), 0xff, NULL);