HomeFreeBSD

MFC r353009: libusb: LIBUSB_DEBUG env var override of libusb_set_debug

Description

MFC r353009: libusb: LIBUSB_DEBUG env var override of libusb_set_debug

The debug level generally just controls verbosity of libusb for debugging
libusb devices/usage. We allow the environment to set the debug level
independent of the application, but the application will always override
this if it explicitly sets the debug level.

Changing the environment is easy, but patching the software to change the
debug level isn't necessarily easy or possible. Further, there's this
write-only debug_fixed variable that would seem to imply that the debug
level should be fixed, but it isn't currently used. Change the logic to use
strtol() so we can detect real 0 vs. conversion failure, then honor
debug_fixed in libusb_set_debug.

Details

Provenance
kevansAuthored on
Parents
rS353134: MFC r352668: cron: log suppression and mail suppression for successful runs
Branches
Unknown
Tags
Unknown