summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2021-09-14 22:36:14 +0200
committerFranck Bui <fbui@suse.com>2021-09-15 12:14:34 +0200
commitd74965e6fe583562ebaf0767da6325a72d11643a (patch)
tree472f5c5908e5ed86819195b02046b23c11d6ea8d /src/shared
parentwatchdog: minor simplification of watchdog_runtime_wait() (diff)
downloadsystemd-d74965e6fe583562ebaf0767da6325a72d11643a.tar.xz
systemd-d74965e6fe583562ebaf0767da6325a72d11643a.zip
watchdog: rename watchdog_set_timeout() into watchdog_setup()
"watchdog_set_timeout()" was misleading as the function is not just a setter - it must be called for activating the watchdog device.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/watchdog.c4
-rw-r--r--src/shared/watchdog.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/watchdog.c b/src/shared/watchdog.c
index b0b377325c..b42d241528 100644
--- a/src/shared/watchdog.c
+++ b/src/shared/watchdog.c
@@ -101,7 +101,7 @@ int watchdog_set_device(char *path) {
return r;
}
-int watchdog_set_timeout(usec_t timeout) {
+int watchdog_setup(usec_t timeout) {
/* Initialize the watchdog timeout with the caller value. This value is
* going to be updated by update_timeout() with the closest value
@@ -191,6 +191,6 @@ void watchdog_close(bool disarm) {
watchdog_fd = safe_close(watchdog_fd);
/* Once closed, pinging the device becomes a NOP and we request a new
- * call to watchdog_set_timeout() to open the device again. */
+ * call to watchdog_setup() to open the device again. */
watchdog_timeout = USEC_INFINITY;
}
diff --git a/src/shared/watchdog.h b/src/shared/watchdog.h
index 08be44fd18..794176d310 100644
--- a/src/shared/watchdog.h
+++ b/src/shared/watchdog.h
@@ -7,7 +7,7 @@
#include "util.h"
int watchdog_set_device(char *path);
-int watchdog_set_timeout(usec_t timeout);
+int watchdog_setup(usec_t timeout);
int watchdog_ping(void);
void watchdog_close(bool disarm);
usec_t watchdog_runtime_wait(void);