all: Allow backend to provide a better get_config_descriptor_by_value
authorHans de Goede <hdegoede@redhat.com>
Thu, 23 May 2013 17:51:07 +0000 (19:51 +0200)
committerHans de Goede <hdegoede@redhat.com>
Fri, 24 May 2013 14:30:38 +0000 (16:30 +0200)
commit6b41074352bec3e8fe132fc74768da8e930a2ab5
treef7aacea9e3024a4b7024f3c4080018dcd179831c
parentda5b335e0c01650818d8e85973728e288c1f409d
all: Allow backend to provide a better get_config_descriptor_by_value

Our core get_config_descriptor_by_value is not exactly pretty nor efficient,
allow the backends to provide something better.

Note that the callback signature differs from get_config_descriptor in that
backend owned memory gets returned. This saves a needless malloc + memcpy +
free. If this turns out to be a problem for some backends we can always
change things to work like get_config_descriptor.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
libusb/descriptor.c
libusb/libusbi.h
libusb/os/linux_usbfs.c
libusb/os/openbsd_usb.c
libusb/os/wince_usb.c
libusb/os/windows_usb.c
libusb/version_nano.h