diff options
author | n_hibma <n_hibma@FreeBSD.org> | 2006-12-15 21:44:49 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 2006-12-15 21:44:49 +0000 |
commit | c98f016084f145e9f139ad1dfbc2cf59f8188f5e (patch) | |
tree | 787bbfce7ce18dfa578e01e209a342d73f933983 /sys/kern/kern_clock.c | |
parent | 705f242eca7e1a52b43a762cced4eaa8de4c0818 (diff) | |
download | FreeBSD-src-c98f016084f145e9f139ad1dfbc2cf59f8188f5e.zip FreeBSD-src-c98f016084f145e9f139ad1dfbc2cf59f8188f5e.tar.gz |
Align the interfaces for the various watchdogs and make the interface
behave as expected.
Also:
- Return an error if WD_PASSIVE is passed in to the ioctl as only
WD_ACTIVE is implemented at the moment. See sys/watchdog.h for an
explanation of the difference between WD_ACTIVE and WD_PASSIVE.
- Remove the I_HAVE_TOTALLY_LOST_MY_SENSE_OF_HUMOR define. If you've
lost your sense of humor, than don't add a define.
Specific changes:
i80321_wdog.c
Don't roll your own passive watchdog tickle as this would defeat the
purpose of an active (userland) watchdog tickle.
ichwd.c / ipmi.c:
WD_ACTIVE means active patting of the watchdog by a userland process,
not whether the watchdog is active. See sys/watchdog.h.
kern_clock.c:
(software watchdog) Remove a check for WD_ACTIVE as this does not make
sense here. This reverts r1.181.
Diffstat (limited to 'sys/kern/kern_clock.c')
-rw-r--r-- | sys/kern/kern_clock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index a3732a8..dbc6d20 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -536,15 +536,15 @@ SYSCTL_PROC(_kern, KERN_CLOCKRATE, clockrate, CTLTYPE_STRUCT|CTLFLAG_RD, #ifdef SW_WATCHDOG static void -watchdog_config(void *unused __unused, u_int cmd, int *err) +watchdog_config(void *unused __unused, u_int cmd, int *error) { u_int u; u = cmd & WD_INTERVAL; - if ((cmd & WD_ACTIVE) && u >= WD_TO_1SEC) { + if (u >= WD_TO_1SEC) { watchdog_ticks = (1 << (u - WD_TO_1SEC)) * hz; watchdog_enabled = 1; - *err = 0; + *error = 0; } else { watchdog_enabled = 0; } |