aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/watchdogd
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2005-03-19 01:46:37 +0000
committerMarius Strobl <marius@FreeBSD.org>2005-03-19 01:46:37 +0000
commitbdd466ffca17a71a175124c09757c8ca6f54d280 (patch)
tree0bda7893e9853a77b2fc02d355c8f689308d2c05 /usr.sbin/watchdogd
parenteb1c12f028d47d0651e7817b01115dbe2c996641 (diff)
downloadsrc-bdd466ffca17a71a175124c09757c8ca6f54d280.tar.gz
src-bdd466ffca17a71a175124c09757c8ca6f54d280.zip
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
Notes
Notes: svn path=/head/; revision=143831
Diffstat (limited to 'usr.sbin/watchdogd')
-rw-r--r--usr.sbin/watchdogd/watchdogd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c
index 0c1b6258bede..321fc5db79a8 100644
--- a/usr.sbin/watchdogd/watchdogd.c
+++ b/usr.sbin/watchdogd/watchdogd.c
@@ -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);
}