An error of LIBUSB_ERROR_PIPE simply means the device has no BOS, so don't
log an error to the console for this.

Signed-off-by: Hans de Goede <hdego...@redhat.com>
---
 libusb/descriptor.c   | 3 ++-
 libusb/version_nano.h | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libusb/descriptor.c b/libusb/descriptor.c
index 358ae61..ec5c344 100644
--- a/libusb/descriptor.c
+++ b/libusb/descriptor.c
@@ -908,7 +908,8 @@ int API_EXPORTED 
libusb_get_bos_descriptor(libusb_device_handle *handle,
        r = libusb_get_descriptor(handle, LIBUSB_DT_BOS, 0, bos_header,
                                  LIBUSB_DT_BOS_SIZE);
        if (r < 0) {
-               usbi_err(handle->dev->ctx, "failed to read BOS (%d)", r);
+               if (r != LIBUSB_ERROR_PIPE)
+                       usbi_err(handle->dev->ctx, "failed to read BOS (%d)", 
r);
                return r;
        }
        if (r < LIBUSB_DT_BOS_SIZE) {
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 75ec58f..5a98334 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 10740
+#define LIBUSB_NANO 10741
-- 
1.8.2.1


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to