Blame SOURCES/0005-linux_udev-silently-ignore-bind-action.patch

15070a
From 2922440e42230d3d1b63397e99efa331f499c755 Mon Sep 17 00:00:00 2001
15070a
From: John Keeping <john@metanate.com>
15070a
Date: Tue, 12 Nov 2019 14:01:40 +0000
15070a
Subject: [PATCH 05/10] linux_udev: silently ignore "bind" action
15070a
15070a
When a driver is bound to a device, udev emits a "bind" action that
15070a
causes libusb to log an error message:
15070a
15070a
	libusb: error [udev_hotplug_event] ignoring udev action bind
15070a
15070a
Since we know this action is not relevant for libusb, silently ignore it
15070a
to avoid people thinking there is something wrong.
15070a
15070a
There is already a debug log entry for the action, so there is no need
15070a
to add a duplicate here.
15070a
15070a
Signed-off-by: John Keeping <john@metanate.com>
15070a
(cherry picked from commit f20f2be7825e34b5273af17fc0740c60bd352b32)
15070a
---
15070a
 libusb/os/linux_udev.c | 2 ++
15070a
 libusb/version_nano.h  | 2 +-
15070a
 2 files changed, 3 insertions(+), 1 deletion(-)
15070a
15070a
diff --git a/libusb/os/linux_udev.c b/libusb/os/linux_udev.c
15070a
index bea03e3..b09d299 100644
15070a
--- a/libusb/os/linux_udev.c
15070a
+++ b/libusb/os/linux_udev.c
15070a
@@ -262,6 +262,8 @@ static void udev_hotplug_event(struct udev_device* udev_dev)
15070a
 			linux_hotplug_enumerate(busnum, devaddr, sys_name);
15070a
 		} else if (detached) {
15070a
 			linux_device_disconnected(busnum, devaddr);
15070a
+		} else if (strncmp(udev_action, "bind", 4) == 0) {
15070a
+			/* silently ignore "known unhandled" action */
15070a
 		} else {
15070a
 			usbi_err(NULL, "ignoring udev action %s", udev_action);
15070a
 		}
15070a
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
15070a
index 41a03d1..1764dec 100644
15070a
--- a/libusb/version_nano.h
15070a
+++ b/libusb/version_nano.h
15070a
@@ -1 +1 @@
15070a
-#define LIBUSB_NANO 11412
15070a
+#define LIBUSB_NANO 11413
15070a
-- 
15070a
2.26.1
15070a