mirror of
https://github.com/systemd/systemd.git
synced 2025-02-22 09:57:34 +03:00
watchdog: really return the actual watchdog timeout
In the current code setting the return argument is never reached.
This commit is contained in:
parent
771f19c06a
commit
56bcbfa5f8
@ -98,6 +98,7 @@ static int open_watchdog(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int watchdog_set_timeout(usec_t *usec) {
|
int watchdog_set_timeout(usec_t *usec) {
|
||||||
|
int r;
|
||||||
|
|
||||||
watchdog_timeout = *usec;
|
watchdog_timeout = *usec;
|
||||||
|
|
||||||
@ -107,11 +108,13 @@ int watchdog_set_timeout(usec_t *usec) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (watchdog_fd < 0)
|
if (watchdog_fd < 0)
|
||||||
return open_watchdog();
|
r = open_watchdog();
|
||||||
else
|
else
|
||||||
return update_timeout();
|
r = update_timeout();
|
||||||
|
|
||||||
*usec = watchdog_timeout;
|
*usec = watchdog_timeout;
|
||||||
|
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int watchdog_ping(void) {
|
int watchdog_ping(void) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user