HomeFreeBSD

libusb: replace LOG_LEVEL with DEBUG_LEVEL

Description

libusb: replace LOG_LEVEL with DEBUG_LEVEL

The libusb set debug level by libusb_log_level instead of
libusb_debug_level. We switch to libusb_log_level for better
compatibility with the upstream libusb.

Additionally, The upstream libusb has an option allows user to override the log
function with a user-defined callback.
To support the callback function with a single string without va_arg, we
refactor the log facility as a function instead of a macro and parse all
va_args inside.

The legacy debug_level enum has been removed to enforce maintainer migrate from their
deprecated source code.

Reviewed by: kevans
Approved by: markj (mentor), lwhsu (mentor)
MFC after: 2 weeks
Sponsored by: FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50680

Details

Provenance
aokblastAuthored on Jun 4 2025, 9:57 AM
Reviewer
kevans
Differential Revision
D50680: libusb: replace DEBUG_LEVEL with LOG_LEVEL
Parents
rG0849d876b1ac: cam/mmc: style(9) pass: put { starting functions on its own line
Branches
Unknown
Tags
Unknown