diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2010-12-14 14:18:32 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2010-12-14 14:18:32 +0100 |
commit | 48a0170b111b55e961be769d2cc4890511bcd991 (patch) | |
tree | 45cc479d03b844d778217523e30dd962daf04076 /udev | |
parent | ff0e1f4e5d897a0ddbf365e920c0e28a6657abaa (diff) |
libudev: enumerate - allow to filter-out not-already-initialized devices
Diffstat (limited to 'udev')
-rw-r--r-- | udev/udev-event.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c index 02a1767b1f..4d38c5b893 100644 --- a/udev/udev-event.c +++ b/udev/udev-event.c @@ -631,12 +631,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) /* set device node name */ util_strscpyl(filename, sizeof(filename), udev_get_dev_path(event->udev), "/", event->name, NULL); udev_device_set_devnode(dev, filename); - } - - 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 */ if (event->dev_db != NULL) udev_node_update_old_links(dev, event->dev_db); @@ -648,6 +643,10 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules) err = udev_node_add(dev, event->mode, event->uid, event->gid); } + udev_device_update_db(dev); + udev_device_tag_index(dev, event->dev_db, true); + udev_device_set_is_initialized(dev); + udev_device_unref(event->dev_db); event->dev_db = NULL; } |