From 4f695aa45972b2d13eecaa0f97a34c7530bfc8c5 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Mon, 4 Nov 2013 23:07:34 +0100 Subject: usb: Output message to show USB configuration change --- src/usb-linux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/usb-linux.c b/src/usb-linux.c index f937de0..9d463c6 100644 --- a/src/usb-linux.c +++ b/src/usb-linux.c @@ -285,6 +285,7 @@ int usb_discover(void) usbmuxd_log(LL_WARNING, "Could not open device %d-%d: %d", bus, address, res); continue; } + int current_config = 0; if((res = libusb_get_configuration(handle, ¤t_config)) != 0) { usbmuxd_log(LL_WARNING, "Could not get configuration for device %d-%d: %d", bus, address, res); @@ -312,6 +313,8 @@ int usb_discover(void) } libusb_free_config_descriptor(config); } + + usbmuxd_log(LL_INFO, "Setting configuration for device %d-%d, from %d to %d", bus, address, current_config, devdesc.bNumConfigurations); if((res = libusb_set_configuration(handle, devdesc.bNumConfigurations)) != 0) { usbmuxd_log(LL_WARNING, "Could not set configuration %d for device %d-%d: %d", devdesc.bNumConfigurations, bus, address, res); libusb_close(handle); -- cgit v1.1-32-gdbae