In watchdog_config enable the software watchdog iff the WD_ACTIVE flag is

set.  When watchdogd(1) is terminated intentionally it clears the bit,
which should then disable it in the kernel.

PR:		kern/74386
Submitted by:	Alex Hoff <ahoff at sandvine dot com>
Approved by:	phk, rwatson (mentor)
This commit is contained in:
Ed Maste 2005-10-27 17:22:47 +00:00
parent dfdbf9be00
commit 5d89e1d0af
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=151747

View File

@ -541,8 +541,7 @@ watchdog_config(void *unused __unused, u_int cmd, int *err)
u_int u;
u = cmd & WD_INTERVAL;
if (cmd && u >= WD_TO_1SEC) {
u = cmd & WD_INTERVAL;
if ((cmd & WD_ACTIVE) && u >= WD_TO_1SEC) {
watchdog_ticks = (1 << (u - WD_TO_1SEC)) * hz;
watchdog_enabled = 1;
*err = 0;