From: Uwe Hermann Date: Sun, 8 Apr 2018 17:47:00 +0000 (+0200) Subject: usbtmc: Silence some overly verbose log messages. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=23d68466f827fa2f2f9b6c5768353d2f7ceab573;p=libsigrok.git usbtmc: Silence some overly verbose log messages. These trigger quite often with unrelated devices and confuse people. scpi_usbtmc: Failed to get configuration descriptor: LIBUSB_ERROR_NOT_FOUND, ignoring device. --- diff --git a/src/scpi/scpi_usbtmc_libusb.c b/src/scpi/scpi_usbtmc_libusb.c index a109703e..dc17c872 100644 --- a/src/scpi/scpi_usbtmc_libusb.c +++ b/src/scpi/scpi_usbtmc_libusb.c @@ -138,8 +138,9 @@ static GSList *scpi_usbtmc_libusb_scan(struct drv_context *drvc) for (confidx = 0; confidx < des.bNumConfigurations; confidx++) { if ((ret = libusb_get_config_descriptor(devlist[i], confidx, &confdes)) < 0) { - sr_dbg("Failed to get configuration descriptor: %s, " - "ignoring device.", libusb_error_name(ret)); + if (ret != LIBUSB_ERROR_NOT_FOUND) + sr_dbg("Failed to get configuration descriptor: %s, " + "ignoring device.", libusb_error_name(ret)); break; } for (intfidx = 0; intfidx < confdes->bNumInterfaces; intfidx++) { @@ -310,8 +311,9 @@ static int scpi_usbtmc_libusb_open(struct sr_scpi_dev_inst *scpi) for (confidx = 0; confidx < des.bNumConfigurations; confidx++) { if ((ret = libusb_get_config_descriptor(dev, confidx, &confdes)) < 0) { - sr_dbg("Failed to get configuration descriptor: %s, " - "ignoring device.", libusb_error_name(ret)); + if (ret != LIBUSB_ERROR_NOT_FOUND) + sr_dbg("Failed to get configuration descriptor: %s, " + "ignoring device.", libusb_error_name(ret)); continue; } for (intfidx = 0; intfidx < confdes->bNumInterfaces; intfidx++) {