diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2010-04-23 09:01:56 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2010-04-23 09:01:56 +0200 |
commit | c1dbe11dc336f9faf02073a66fe30a12bd438e23 (patch) | |
tree | 6bc896d46eb708173568dc6b96d0e25859c1a81d /udev | |
parent | 1dbfbfbea6d80971fba6bb57469b5c437a8980d6 (diff) |
delete old tags when configuration changes
Diffstat (limited to 'udev')
-rw-r--r-- | udev/udev-event.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c index 212ccc7950..2d8becd86a 100644 --- a/udev/udev-event.c +++ b/udev/udev-event.c @@ -544,6 +544,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) if (strcmp(udev_device_get_action(dev), "remove") == 0) { udev_device_read_db(dev); udev_device_delete_db(dev); + udev_device_tag_index(dev, NULL, false); if (major(udev_device_get_devnum(dev)) != 0) udev_watch_end(event->udev, dev); @@ -577,6 +578,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) /* delete stale db file */ udev_device_delete_db(dev); + udev_device_tag_index(dev, NULL, false); /* remember old name */ udev_device_add_property(dev, "INTERFACE_OLD", udev_device_get_sysname(dev)); @@ -618,6 +620,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) if (event->name == NULL) { /* things went wrong */ udev_device_delete_db(dev); + udev_device_tag_index(dev, NULL, false); udev_device_unref(event->dev_db); err = -ENOMEM; goto out; @@ -629,6 +632,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) } udev_device_update_db(dev); + udev_device_tag_index(dev, event->dev_db, true); if (major(udev_device_get_devnum(dev)) != 0) { /* remove/update possible left-over symlinks from old database entry */ |