aboutsummaryrefslogtreecommitdiffstats
path: root/libusb/io.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-05-16 21:50:50 +0200
committerHans de Goede <hdegoede@redhat.com>2013-05-16 21:54:22 +0200
commitc235fa2f9d90b6f65f75c545e90596545879ca4f (patch)
treeda6d4e041b1b5a0ae37dc1a6cccfd36416bf8a46 /libusb/io.c
parent631d1ae168e66d802f3a635a60ee0a6724a6d7c7 (diff)
downloadandroid_external_libusbx-c235fa2f9d90b6f65f75c545e90596545879ca4f.tar.gz
android_external_libusbx-c235fa2f9d90b6f65f75c545e90596545879ca4f.tar.bz2
android_external_libusbx-c235fa2f9d90b6f65f75c545e90596545879ca4f.zip
core: Improve error / debug messages for hotplug pipe handling
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'libusb/io.c')
-rw-r--r--libusb/io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libusb/io.c b/libusb/io.c
index d295cec..595c92e 100644
--- a/libusb/io.c
+++ b/libusb/io.c
@@ -1943,9 +1943,13 @@ static int handle_events(struct libusb_context *ctx, struct timeval *tv)
libusb_hotplug_message message;
ssize_t ret;
+ usbi_dbg("caught a fish on the hotplug pipe");
+
/* read the message from the hotplug thread */
ret = usbi_read(ctx->hotplug_pipe[0], &message, sizeof (message));
if (ret < sizeof(message)) {
+ usbi_err(ctx, "hotplug pipe read error %d < %d",
+ ret, sizeof(message));
ret = LIBUSB_ERROR_OTHER;
goto handled;
}