diff options
author | Tom Gundersen <teg@jklm.no> | 2015-03-13 18:43:00 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-03-13 18:47:07 +0100 |
commit | 1b14c3cfbe25f9bf1183bd26875f3c68847559c0 (patch) | |
tree | 205ad65aa947bd405ebd10ad815d2985df93ccec /src/udev/udev-event.c | |
parent | 0964dcd77213a9e229efcc2f00084e1f63fc00ca (diff) |
udev: make set_usec_initialized() internal to libudev
Instead introduce ensure_usec_initialized(), which copies the timestamp if possible otherwise
sets it to now(CLOCK_MONOTONIC).
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r-- | src/udev/udev-event.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index f62c1eaf47..3a165b0b4f 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -873,10 +873,7 @@ void udev_event_execute_rules(struct udev_event *event, } /* 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 if (udev_device_get_usec_initialized(event->dev) == 0) - udev_device_set_usec_initialized(event->dev, now(CLOCK_MONOTONIC)); + udev_device_ensure_usec_initialized(event->dev, event->dev_db); /* (re)write database file */ udev_device_update_db(dev); |