From 6243332782f2d286d49f1dec8a628b0a403665fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkki=20Sepp=C3=A4l=C3=A4?= Date: Fri, 18 Mar 2011 16:35:36 +0200 Subject: [PATCH] config: handle device change event properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wakeup_handler in udev.c wasn't dealing with udev change events. There are situations when a device can gain its input capabilities after it has been added to the system and therefore the change events must be handled as well. The change is handled as a consecutive device removal and addition. Signed-off-by: Erkki Seppälä Signed-off-by: Stefan Kost Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer --- config/udev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/udev.c b/config/udev.c index 678e47a39..9ac34ee50 100644 --- a/config/udev.c +++ b/config/udev.c @@ -255,6 +255,10 @@ wakeup_handler(pointer data, int err, pointer read_mask) device_added(udev_device); else if (!strcmp(action, "remove")) device_removed(udev_device); + else if (!strcmp(action, "change")) { + device_removed(udev_device); + device_added(udev_device); + } } udev_device_unref(udev_device); }