X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fzeroplus-logic-cube%2Fapi.c;h=7a4041a16143f7d6dc84d7b35af3d4e224692a8f;hb=0fb45121254b159e1dabf8fd3f3bbd84e4aa693d;hp=da3899dd404d217de644efb0ad671e35b66d6aee;hpb=be61937929fa85f57ba3a495ce42af1539f19b03;p=libsigrok.git diff --git a/src/hardware/zeroplus-logic-cube/api.c b/src/hardware/zeroplus-logic-cube/api.c index da3899dd..7a4041a1 100644 --- a/src/hardware/zeroplus-logic-cube/api.c +++ b/src/hardware/zeroplus-logic-cube/api.c @@ -196,7 +196,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) libusb_close(hdl); - usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)); + if (usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)) < 0) + continue; prof = NULL; for (j = 0; j < zeroplus_models[j].vid; j++) { @@ -394,7 +395,7 @@ static int config_list(uint32_t key, GVariant **data, switch (key) { case SR_CONF_DEVICE_OPTIONS: - return STD_CONFIG_LIST(key, data, sdi, cg, NULL, drvopts, devopts); + return STD_CONFIG_LIST(key, data, sdi, cg, NO_OPTS, drvopts, devopts); case SR_CONF_SAMPLERATE: devc = sdi->priv; if (devc->prof->max_sampling_freq == 100) @@ -546,8 +547,9 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) unsigned int buf_offset; res = analyzer_read_data(usb->devhdl, buf, PACKET_SIZE); - sr_info("Tried to read %d bytes, actually read %d bytes.", - PACKET_SIZE, res); + if (res != PACKET_SIZE) + sr_warn("Tried to read %d bytes, actually read %d.", + PACKET_SIZE, res); if (discard >= PACKET_SIZE / 4) { discard -= PACKET_SIZE / 4;