diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-03-28 16:41:10 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-03-28 16:55:41 +0200 |
commit | ba4e0427e955a648e24f6506d0cb92857c84b85d (patch) | |
tree | 78d563c6d8b36fab7b7d53997d5a27f55cad10d6 /src/shared/watchdog.c | |
parent | ec4954d934c67c315669eff5593a68fd402a63e8 (diff) | |
download | systemd-ba4e0427e955a648e24f6506d0cb92857c84b85d.tar.gz |
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/shared/watchdog.c')
-rw-r--r-- | src/shared/watchdog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c index c4a4702a37..2476778c94 100644 --- a/src/shared/watchdog.c +++ b/src/shared/watchdog.c @@ -195,7 +195,7 @@ static int watchdog_ping_now(void) { if (ioctl(watchdog_fd, WDIOC_KEEPALIVE, 0) < 0) return log_warning_errno(errno, "Failed to ping hardware watchdog, ignoring: %m"); - watchdog_last_ping = now(clock_boottime_or_monotonic()); + watchdog_last_ping = now(CLOCK_BOOTTIME); return 0; } @@ -411,7 +411,7 @@ usec_t watchdog_runtime_wait(void) { /* Sleep half the watchdog timeout since the last successful ping at most */ if (timestamp_is_set(watchdog_last_ping)) { - usec_t ntime = now(clock_boottime_or_monotonic()); + usec_t ntime = now(CLOCK_BOOTTIME); assert(ntime >= watchdog_last_ping); return usec_sub_unsigned(watchdog_last_ping + (timeout / 2), ntime); @@ -430,7 +430,7 @@ int watchdog_ping(void) { /* open_watchdog() will automatically ping the device for us if necessary */ return open_watchdog(); - ntime = now(clock_boottime_or_monotonic()); + ntime = now(CLOCK_BOOTTIME); timeout = calc_timeout(); /* Never ping earlier than watchdog_timeout/4 and try to ping |