watchdog: wait for WDT reset only if watchdogd is running

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2021-04-19 14:41:48 +02:00
1 parent 79dc6e7472
commit c85551a42e
2 files changed
+5 -6

No files matched your search

+1 -1
View File
@@ -267,7 +267,7 @@ void do_shutdown(shutop_t op)
/* Reboot via watchdog or kernel, or shutdown? */
if (op == SHUT_REBOOT) {
if (wdog) {
if (wdog && wdog->pid > 1) {
int timeout = 10;
/* Wait here until the WDT reboots, or timeout with fallback */