summaryrefslogtreecommitdiff
path: root/src/udev/udevd.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-03-13 18:43:00 +0100
committerTom Gundersen <teg@jklm.no>2015-03-13 18:47:07 +0100
commit1b14c3cfbe25f9bf1183bd26875f3c68847559c0 (patch)
tree205ad65aa947bd405ebd10ad815d2985df93ccec /src/udev/udevd.c
parent0964dcd77213a9e229efcc2f00084e1f63fc00ca (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/udevd.c')
-rw-r--r--src/udev/udevd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index f7d61915fb..8eaf2cdc8c 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1474,8 +1474,8 @@ int main(int argc, char *argv[]) {
struct udev_device *dev;
dev = udev_monitor_receive_device(monitor);
- if (dev != NULL) {
- udev_device_set_usec_initialized(dev, now(CLOCK_MONOTONIC));
+ if (dev) {
+ udev_device_ensure_usec_initialized(dev, NULL);
if (event_queue_insert(dev) < 0)
udev_device_unref(dev);
}