[Bug 291774] libusb_open reports all libusb20_dev_open errors as LIBUSB_ERROR_NO_MEM

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 18 Dec 2025 13:59:16 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291774

            Bug ID: 291774
           Summary: libusb_open reports all libusb20_dev_open errors as
                    LIBUSB_ERROR_NO_MEM
           Product: Base System
           Version: 15.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: usb
          Assignee: usb@FreeBSD.org
          Reporter: unitrunker@unitrunker.net

libusb_open returns LIBUSB_ERROR_NO_MEM for any error returned by
libusb20_dev_open. Map some of the key errors reported by libusb20_dev_open to
their LIBUSB counterparts. As a minumum:

LIBUSB_ERROR_BUSY
LIBUSB_ERROR_ACCESS
LIBUSB_ERROR_NO_DEVICE

The added granularity aids USB client software to give a better user
experience.

-- 
You are receiving this mail because:
You are the assignee for the bug.