diff options
| author | 2016-07-07 11:38:22 +0200 | |
|---|---|---|
| committer | 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) | |||
| 800 | devlist_failures = 0; | 800 | devlist_failures = 0; |
| 801 | device_polling = 1; | 801 | device_polling = 1; |
| 802 | res = libusb_init(NULL); | 802 | res = libusb_init(NULL); |
| 803 | //libusb_set_debug(NULL, 3); | 803 | |
| 804 | libusb_set_debug(NULL, (log_level >= LL_DEBUG ? LIBUSB_LOG_LEVEL_DEBUG: (log_level >= LL_WARNING ? LIBUSB_LOG_LEVEL_WARNING: LIBUSB_LOG_LEVEL_NONE))); | ||
| 805 | |||
| 804 | if(res != 0) { | 806 | if(res != 0) { |
| 805 | usbmuxd_log(LL_FATAL, "libusb_init failed: %d", res); | 807 | usbmuxd_log(LL_FATAL, "libusb_init failed: %d", res); |
| 806 | return -1; | 808 | return -1; |
