diff options
-rw-r--r-- | config/udev.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/config/udev.c b/config/udev.c index 9ac34ee50..5ac52a1d7 100644 --- a/config/udev.c +++ b/config/udev.c @@ -251,14 +251,12 @@ wakeup_handler(pointer data, int err, pointer read_mask) return; action = udev_device_get_action(udev_device); if (action) { - if (!strcmp(action, "add")) - device_added(udev_device); - else if (!strcmp(action, "remove")) - device_removed(udev_device); - else if (!strcmp(action, "change")) { + if (!strcmp(action, "add") || !strcmp(action, "change")) { device_removed(udev_device); device_added(udev_device); } + else if (!strcmp(action, "remove")) + device_removed(udev_device); } udev_device_unref(udev_device); } |