summaryrefslogtreecommitdiff
path: root/udev/udev-event.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev/udev-event.c')
-rw-r--r--udev/udev-event.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c
index 4d38c5b893..100a79c1e8 100644
--- a/udev/udev-event.c
+++ b/udev/udev-event.c
@@ -643,6 +643,13 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules)
err = udev_node_add(dev, event->mode, event->uid, event->gid);
}
+ /* preserve old, or get new initialization timestamp */
+ if (event->dev_db != NULL && udev_device_get_usec_initialized(event->dev_db) > 0)
+ udev_device_set_usec_initialized(event->dev, udev_device_get_usec_initialized(event->dev_db));
+ else
+ udev_device_set_usec_initialized(event->dev, usec_monotonic());
+
+ /* (re)write database file */
udev_device_update_db(dev);
udev_device_tag_index(dev, event->dev_db, true);
udev_device_set_is_initialized(dev);