We have an implementation of get_configuration with usbfs, so lets use it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
int *config)
{
int r;
- if (sysfs_can_relate_devices != 1)
- return LIBUSB_ERROR_NOT_SUPPORTED;
- r = sysfs_get_active_config(handle->dev, config);
+ if (sysfs_can_relate_devices) {
+ r = sysfs_get_active_config(handle->dev, config);
+ } else {
+ r = usbfs_get_active_config(handle->dev,
+ _device_handle_priv(handle)->fd);
+ }
if (r < 0)
return r;
-#define LIBUSB_NANO 10707
+#define LIBUSB_NANO 10708