diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2005-09-30 08:30:20 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2005-09-30 08:30:20 +0000 |
| commit | 2a5f59b24142ddd3b4103d8f1176be3f72e30fdf (patch) | |
| tree | 6539c591b61edc79caf540e27a0438c01c3129f9 /usr.sbin | |
| parent | 763a4295719c8d853e4b27e6012b6a69537cf4b2 (diff) | |
Notes
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/watchdogd/watchdogd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c index 8d084c78007c1..01ccdd6a0c41c 100644 --- a/usr.sbin/watchdogd/watchdogd.c +++ b/usr.sbin/watchdogd/watchdogd.c @@ -129,8 +129,7 @@ main(int argc, char *argv[]) timeout |= WD_PASSIVE; else timeout |= WD_ACTIVE; - if (watchdog_patpat() < 0 && - (timeout & WD_INTERVAL) != WD_TO_NEVER) + if (watchdog_patpat() < 0) err(EX_OSERR, "patting the dog"); return (EX_OK); } @@ -282,6 +281,8 @@ parseargs(int argc, char *argv[]) /* NOTREACHED */ } } + if (argc != optind) + errx(EX_USAGE, "extra arguments."); if (is_daemon && timeout < WD_TO_1SEC) errx(EX_USAGE, "-t argument is less than one second."); } |
