summaryrefslogtreecommitdiff
path: root/libusb/os/openbsd_usb.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-05-23 19:51:07 +0200
committerHans de Goede <hdegoede@redhat.com>2013-05-24 16:30:38 +0200
commit6b41074352bec3e8fe132fc74768da8e930a2ab5 (patch)
treef7aacea9e3024a4b7024f3c4080018dcd179831c /libusb/os/openbsd_usb.c
parentda5b335e0c01650818d8e85973728e288c1f409d (diff)
downloadlibusb-6b41074352bec3e8fe132fc74768da8e930a2ab5.tar.gz
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>
Diffstat (limited to 'libusb/os/openbsd_usb.c')
-rw-r--r--libusb/os/openbsd_usb.c1
1 files changed, 1 insertions, 0 deletions
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,