[PATCH libinput 1/4] evdev: move the 'device removed' message to the evdev backend

Peter Hutterer peter.hutterer at who-t.net
Fri Feb 24 06:15:22 UTC 2017


Preparation work for standardizing log messages better

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev.c     | 5 +++++
 src/udev-seat.c | 4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index 6132d54..881b5d4 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -3444,6 +3444,11 @@ evdev_device_remove(struct evdev_device *device)
 {
 	struct libinput_device *dev;
 
+	log_info(evdev_libinput_context(device),
+		 "input device %s, %s removed\n",
+		 device->devname,
+		 udev_device_get_devnode(device->udev_device));
+
 	list_for_each(dev, &device->base.seat->devices_list, link) {
 		struct evdev_device *d = evdev_device(dev);
 		if (dev == &device->base)
diff --git a/src/udev-seat.c b/src/udev-seat.c
index a19afb4..47b4d05 100644
--- a/src/udev-seat.c
+++ b/src/udev-seat.c
@@ -114,10 +114,6 @@ device_removed(struct udev_device *udev_device, struct udev_input *input)
 				   &seat->base.devices_list, base.link) {
 			if (streq(syspath,
 				  udev_device_get_syspath(device->udev_device))) {
-				log_info(&input->base,
-					 "input device %s, %s removed\n",
-					 device->devname,
-					 udev_device_get_devnode(device->udev_device));
 				evdev_device_remove(device);
 				break;
 			}
-- 
2.9.3



More information about the wayland-devel mailing list