summaryrefslogtreecommitdiffstats
path: root/src/udev
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-03-28 16:41:10 +0200
committerLennart Poettering <lennart@poettering.net>2022-03-28 16:55:41 +0200
commitba4e0427e955a648e24f6506d0cb92857c84b85d (patch)
tree78d563c6d8b36fab7b7d53997d5a27f55cad10d6 /src/udev
parentnetwork: rename netdev kind virtual-wlan -> wlan (diff)
downloadsystemd-ba4e0427e955a648e24f6506d0cb92857c84b85d.tar.xz
systemd-ba4e0427e955a648e24f6506d0cb92857c84b85d.zip
time-util: assume CLOCK_BOOTTIME always exists
Let's raise our supported baseline a bit: CLOCK_BOOTTIME started to work with timerfd in kernel 3.15 (i.e. back in 2014), let's require support for it now. This will raise our baseline only modestly from 3.13 → 3.15.
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udev-ctrl.c2
-rw-r--r--src/udev/udevd.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c
index 45e45162ae..4913d0262b 100644
--- a/src/udev/udev-ctrl.c
+++ b/src/udev/udev-ctrl.c
@@ -356,7 +356,7 @@ int udev_ctrl_wait(UdevCtrl *uctrl, usec_t timeout) {
if (timeout != USEC_INFINITY) {
r = sd_event_add_time_relative(
- uctrl->event, &source_timeout, clock_boottime_or_monotonic(),
+ uctrl->event, &source_timeout, CLOCK_BOOTTIME,
timeout,
0, NULL, INT_TO_PTR(-ETIMEDOUT));
if (r < 0)
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 4d03f82fae..67d7733be2 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -807,7 +807,7 @@ static int event_is_blocked(Event *event) {
if (event->retry_again_next_usec > 0) {
usec_t now_usec;
- r = sd_event_now(event->manager->event, clock_boottime_or_monotonic(), &now_usec);
+ r = sd_event_now(event->manager->event, CLOCK_BOOTTIME, &now_usec);
if (r < 0)
return r;
@@ -1013,7 +1013,7 @@ static int event_requeue(Event *event) {
event->timeout_event = sd_event_source_disable_unref(event->timeout_event);
/* add a short delay to suppress busy loop */
- r = sd_event_now(event->manager->event, clock_boottime_or_monotonic(), &now_usec);
+ r = sd_event_now(event->manager->event, CLOCK_BOOTTIME, &now_usec);
if (r < 0)
return log_device_warning_errno(event->dev, r,
"Failed to get current time, "