From e2f29ba553c24d6910d7ff1966c30677a7a3882d Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Thu, 7 Jul 2016 11:38:22 +0200 Subject: Map debug to log levels and enable debug output for libusb --- src/usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/usb.c b/src/usb.c index bae5a4d..7b78b02 100644 --- a/src/usb.c +++ b/src/usb.c @@ -800,7 +800,9 @@ int usb_init(void) devlist_failures = 0; device_polling = 1; res = libusb_init(NULL); - //libusb_set_debug(NULL, 3); + + libusb_set_debug(NULL, (log_level >= LL_DEBUG ? LIBUSB_LOG_LEVEL_DEBUG: (log_level >= LL_WARNING ? LIBUSB_LOG_LEVEL_WARNING: LIBUSB_LOG_LEVEL_NONE))); + if(res != 0) { usbmuxd_log(LL_FATAL, "libusb_init failed: %d", res); return -1; -- cgit v1.1-32-gdbae