From 6b41074352bec3e8fe132fc74768da8e930a2ab5 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 23 May 2013 19:51:07 +0200 Subject: 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 --- libusb/os/openbsd_usb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libusb/os/openbsd_usb.c') diff --git a/libusb/os/openbsd_usb.c b/libusb/os/openbsd_usb.c index 06aaff4..e1c91f4 100644 --- a/libusb/os/openbsd_usb.c +++ b/libusb/os/openbsd_usb.c @@ -99,6 +99,7 @@ const struct usbi_os_backend openbsd_backend = { obsd_get_device_descriptor, obsd_get_active_config_descriptor, obsd_get_config_descriptor, + NULL, /* get_config_descriptor_by_value() */ obsd_get_configuration, obsd_set_configuration, -- cgit v1.2.1