summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_clock.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-02-28 22:01:19 +0000
committerphk <phk@FreeBSD.org>2004-02-28 22:01:19 +0000
commitc45bc64148858987129bc6b7e0f3d0c10b5bbe35 (patch)
tree0c0d5afc7be70fd3ef707c4b68dce90ac80d256e /sys/kern/kern_clock.c
parent54bb06645bcb9423b6e98622189414a1d7172428 (diff)
downloadFreeBSD-src-c45bc64148858987129bc6b7e0f3d0c10b5bbe35.zip
FreeBSD-src-c45bc64148858987129bc6b7e0f3d0c10b5bbe35.tar.gz
Make sure to disable the watchdog if we cannot honour the timeout.
Diffstat (limited to 'sys/kern/kern_clock.c')
-rw-r--r--sys/kern/kern_clock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index e90e024..027ce78 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -510,10 +510,9 @@ watchdog_config(void *unused __unused, u_int cmd, int *err)
{
u_int u;
- if (cmd) {
+ u = cmd & WD_INTERVAL;
+ if (cmd && u >= WD_TO_1SEC) {
u = cmd & WD_INTERVAL;
- if (u < WD_TO_1SEC)
- return;
watchdog_ticks = (1 << (u - WD_TO_1SEC)) * hz;
watchdog_enabled = 1;
*err = 0;
OpenPOWER on IntegriCloud