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
+2 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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);