diff options
author | Hans de Goede <hdegoede@redhat.com> | 2013-06-14 11:10:35 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2013-06-14 15:47:19 +0200 |
commit | f9ef58d8c4fea65152938c2bc7b8bff60d4a14a6 (patch) | |
tree | 467cde7fdaae0c9510b019ff863af0bf6db7d7ce | |
parent | 4d099d08a99aff38c72e393d7eef94b6436d39f8 (diff) | |
download | android_external_libusbx-f9ef58d8c4fea65152938c2bc7b8bff60d4a14a6.tar.gz android_external_libusbx-f9ef58d8c4fea65152938c2bc7b8bff60d4a14a6.tar.bz2 android_external_libusbx-f9ef58d8c4fea65152938c2bc7b8bff60d4a14a6.zip |
libusb_get_bos_descriptor: Don't log an error on devices without a BOS
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 <hdegoede@redhat.com>
-rw-r--r-- | libusb/descriptor.c | 3 | ||||
-rw-r--r-- | 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 5d7f2b9..6447594 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10736 +#define LIBUSB_NANO 10737 |