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.
This commit is contained in:
Franck Bui
2021-09-15 12:14:34 +02:00
parent 9692ead197
commit d74965e6fe
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -1539,7 +1539,7 @@ static int become_shutdown(
/* If we reboot or kexec let's set the shutdown watchdog and
* tell the shutdown binary to repeatedly ping it */
r = watchdog_set_timeout(watchdog_timer);
r = watchdog_setup(watchdog_timer);
watchdog_close(r < 0);
/* Tell the binary how often to ping, ignore failure */
+2 -2
View File
@@ -3205,7 +3205,7 @@ void manager_set_watchdog(Manager *m, WatchdogType t, usec_t timeout) {
if (t == WATCHDOG_RUNTIME)
if (!timestamp_is_set(m->watchdog_overridden[WATCHDOG_RUNTIME])) {
if (timestamp_is_set(timeout))
(void) watchdog_set_timeout(timeout);
(void) watchdog_setup(timeout);
else
watchdog_close(true);
}
@@ -3227,7 +3227,7 @@ int manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout) {
usec_t usec = timestamp_is_set(timeout) ? timeout : m->watchdog[t];
if (timestamp_is_set(usec))
(void) watchdog_set_timeout(usec);
(void) watchdog_setup(usec);
else
watchdog_close(true);
}