diff options
author | Martin Szulecki | 2016-07-07 11:38:22 +0200 |
---|---|---|
committer | Martin Szulecki | 2020-06-07 21:57:17 +0200 |
commit | e2f29ba553c24d6910d7ff1966c30677a7a3882d (patch) | |
tree | aa080b1b4de5e68904d0caa4dec7c77a305c6fda | |
parent | 38844beff5f288b625720978c075600361919448 (diff) | |
download | usbmuxd-e2f29ba553c24d6910d7ff1966c30677a7a3882d.tar.gz usbmuxd-e2f29ba553c24d6910d7ff1966c30677a7a3882d.tar.bz2 |
Map debug to log levels and enable debug output for libusb
-rw-r--r-- | src/usb.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |