Make sure to disable the watchdog if we cannot honour the timeout.

This commit is contained in:
Poul-Henning Kamp 2004-02-28 22:01:19 +00:00
parent 278445ba35
commit 3d6e5ccb06
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=126386

View File

@ -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;