summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keeping <john@metanate.com>2019-11-12 14:01:40 +0000
committerLudovic Rousseau <ludovic.rousseau@free.fr>2019-12-03 22:51:16 +0100
commitf20f2be7825e34b5273af17fc0740c60bd352b32 (patch)
treec317eea3ae25084fa8eadc9c27f8c0eb2b29c50a
parent97ece77c4a6eaafd0a74fd3b73e290ec97d71eb5 (diff)
downloadlibusb-f20f2be7825e34b5273af17fc0740c60bd352b32.tar.gz
linux_udev: silently ignore "bind" action
When a driver is bound to a device, udev emits a "bind" action that causes libusb to log an error message: libusb: error [udev_hotplug_event] ignoring udev action bind Since we know this action is not relevant for libusb, silently ignore it to avoid people thinking there is something wrong. There is already a debug log entry for the action, so there is no need to add a duplicate here. Signed-off-by: John Keeping <john@metanate.com>
-rw-r--r--libusb/os/linux_udev.c2
-rw-r--r--libusb/version_nano.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/libusb/os/linux_udev.c b/libusb/os/linux_udev.c
index bea03e3..b09d299 100644
--- a/libusb/os/linux_udev.c
+++ b/libusb/os/linux_udev.c
@@ -262,6 +262,8 @@ static void udev_hotplug_event(struct udev_device* udev_dev)
linux_hotplug_enumerate(busnum, devaddr, sys_name);
} else if (detached) {
linux_device_disconnected(busnum, devaddr);
+ } else if (strncmp(udev_action, "bind", 4) == 0) {
+ /* silently ignore "known unhandled" action */
} else {
usbi_err(NULL, "ignoring udev action %s", udev_action);
}
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 41a03d1..1764dec 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11412
+#define LIBUSB_NANO 11413