At least in Linux, wireless USB devices have zero configurations until
they have been authorized. This device state can be set for any USB
device using:
echo 0 > /sys/bus/usb/devices/?-?/authorized
An unauthorized device would previously make usbi_sanitize_device()
return LIBUSB_ERROR_IO, although there really was no I/O error.
Reported-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
if (num_configurations > USB_MAXCONFIG) {
usbi_err(DEVICE_CTX(dev), "too many configurations");
return LIBUSB_ERROR_IO;
if (num_configurations > USB_MAXCONFIG) {
usbi_err(DEVICE_CTX(dev), "too many configurations");
return LIBUSB_ERROR_IO;
- } else if (num_configurations < 1) {
- usbi_dbg("no configurations?");
- return LIBUSB_ERROR_IO;
- }
+ } else if (0 == num_configurations)
+ usbi_dbg("zero configurations, maybe an unauthorized device");
dev->num_configurations = num_configurations;
return 0;
dev->num_configurations = num_configurations;
return 0;