mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
When disarming a watchdog by using an interval of WD_TO_NEVER a non-zero
return value of the ioctl doesn't indicate that the command has failed so don't let watchdog(8) return an error in this case. MFC after: 3 days
This commit is contained in:
parent
eb1c12f028
commit
bdd466ffca
1 changed files with 2 additions and 1 deletions
|
|
@ -120,7 +120,8 @@ main(int argc, char *argv[])
|
|||
timeout |= WD_PASSIVE;
|
||||
else
|
||||
timeout |= WD_ACTIVE;
|
||||
if (watchdog_patpat() < 0)
|
||||
if (watchdog_patpat() < 0 &&
|
||||
(timeout & WD_INTERVAL) != WD_TO_NEVER)
|
||||
err(EX_OSERR, "patting the dog");
|
||||
return (EX_OK);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue