/* 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 */
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);
}
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);
}
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
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;
}
#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);
log_warning_errno(r, "Failed to parse watchdog timeout '%s', ignoring: %m",
watchdog_usec);
else
- (void) watchdog_set_timeout(usec);
+ (void) watchdog_setup(usec);
}
/* Lock us into memory */
t = slow ? 10 * USEC_PER_SEC : 1 * USEC_PER_SEC;
count = slow ? 5 : 3;
- r = watchdog_set_timeout(t);
+ r = watchdog_setup(t);
if (r < 0)
log_warning_errno(r, "Failed to open watchdog: %m");
if (r == -EPERM)