diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-08-17 21:05:18 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2011-08-17 21:05:18 +0200 |
commit | a20a57a7bfbc6edd7602c135ca78f3e56878badb (patch) | |
tree | 4460dac44dfccd5f5e380de17c0b28de8bc79711 /udev | |
parent | cdfdc85fb5728c844460c67641bea7197e104b12 (diff) |
export USEC_INITIALIZED= and take timestamp on message receive time
Diffstat (limited to 'udev')
-rw-r--r-- | udev/udev-event.c | 2 | ||||
-rw-r--r-- | udev/udevd.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c index 391fce81c3..3c1a3e7aa7 100644 --- a/udev/udev-event.c +++ b/udev/udev-event.c @@ -1040,7 +1040,7 @@ int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, /* 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 + else if (udev_device_get_usec_initialized(event->dev) == 0) udev_device_set_usec_initialized(event->dev, now_usec()); /* (re)write database file */ diff --git a/udev/udevd.c b/udev/udevd.c index f1a31e7afb..325ad034c2 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -1655,6 +1655,7 @@ int main(int argc, char *argv[]) dev = udev_monitor_receive_device(monitor); if (dev != NULL) + udev_device_set_usec_initialized(dev, now_usec()); if (event_queue_insert(dev) < 0) udev_device_unref(dev); } |