projects
/
platform
/
upstream
/
libusb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
feb33fc
)
Linux: Don't spam the console with 'device unconfigured' errors
author
Hans de Goede
<hdegoede@redhat.com>
Fri, 30 Mar 2012 12:40:32 +0000
(13:40 +0100)
committer
Pete Batard
<pete@akeo.ie>
Sat, 31 Mar 2012 21:05:18 +0000
(22:05 +0100)
libusb/os/linux_usbfs.c
patch
|
blob
|
history
diff --git
a/libusb/os/linux_usbfs.c
b/libusb/os/linux_usbfs.c
index
780f0bd
..
8713a09
100644
(file)
--- a/
libusb/os/linux_usbfs.c
+++ b/
libusb/os/linux_usbfs.c
@@
-504,7
+504,7
@@
static int sysfs_get_active_config(struct libusb_device *dev, int *config)
"read bConfigurationValue failed ret=%d errno=%d", r, errno);
return LIBUSB_ERROR_IO;
} else if (r == 0) {
- usbi_
err(DEVICE_CTX(dev),
"device unconfigured");
+ usbi_
dbg(
"device unconfigured");
*config = -1;
return 0;
}
@@
-1199,8
+1199,10
@@
static int op_get_configuration(struct libusb_device_handle *handle,
if (r < 0)
return r;
- if (*config == -1)
+ if (*config == -1) {
+ usbi_err(HANDLE_CTX(handle), "device unconfigured");
*config = 0;
+ }
return 0;
}