diff options
author | Chris Clayton <chris2553@googlemail.com> | 2015-06-18 13:22:13 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-06-18 13:22:13 -0400 |
commit | 52a4d0c0d509e89571fdd7233b9b259c5fcafe52 (patch) | |
tree | a41f12732862698372368f86ca5314a33c67b0b0 /src/udev/udev-event.c | |
parent | 7061de26fa038719b70f6fdf971acf8ff807fd2f (diff) |
udevd: fix REMOVE handling
The original upstream commit is at
http://cgit.freedesktop.org/systemd/systemd/commit/?id=107f2e2526d476c6cc9b81a690391c111027d641
This was reworked by Chris Clayton for eudev.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r-- | src/udev/udev-event.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index 8db287b141..ed6f203ce7 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -811,6 +811,10 @@ void udev_event_execute_rules(struct udev_event *event, return; if (streq(udev_device_get_action(dev), "remove")) { + udev_device_read_db(dev); + udev_device_tag_index(dev, NULL, false); + udev_device_delete_db(dev); + if (major(udev_device_get_devnum(dev)) != 0) udev_watch_end(event->udev, dev); @@ -821,9 +825,6 @@ void udev_event_execute_rules(struct udev_event *event, if (major(udev_device_get_devnum(dev)) != 0) udev_node_remove(dev); - - udev_device_delete_db(dev); - udev_device_tag_index(dev, NULL, false); } else { event->dev_db = udev_device_clone_with_db(dev); if (event->dev_db != NULL) { |