diff options
author | Masao Uebayashi <uebayasi@cvs.openbsd.org> | 2016-01-10 14:44:10 +0000 |
---|---|---|
committer | Masao Uebayashi <uebayasi@cvs.openbsd.org> | 2016-01-10 14:44:10 +0000 |
commit | 16301a90fd2ed7c5767d7d367a0e96422982a9a5 (patch) | |
tree | f936a11f5220c360ea5d4d8c13be3572e4684391 /sys/dev/ipmi.c | |
parent | 6724946419eec5c45601f71356565f043446cd39 (diff) |
Print a message to console when ipmi(4) watchdog is either enabled or
disabled. Replace a magic number while here.
Diffstat (limited to 'sys/dev/ipmi.c')
-rw-r--r-- | sys/dev/ipmi.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/ipmi.c b/sys/dev/ipmi.c index c9e4c9f4f61..9b8f26f96ec 100644 --- a/sys/dev/ipmi.c +++ b/sys/dev/ipmi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipmi.c,v 1.80 2016/01/10 14:17:00 uebayasi Exp $ */ +/* $OpenBSD: ipmi.c,v 1.81 2016/01/10 14:44:09 uebayasi Exp $ */ /* * Copyright (c) 2005 Jordan Hargrave @@ -1749,6 +1749,8 @@ ipmi_activate(struct device *self, int act) return (0); } +#define MIN_PERIOD 10 + int ipmi_watchdog(void *arg, int period) { @@ -1770,8 +1772,8 @@ ipmi_watchdog(void *arg, int period) return (period); } - if (period < 10 && period > 0) - period = 10; + if (period < MIN_PERIOD && period > 0) + period = MIN_PERIOD; s = splsoftclock(); sc->sc_poll = 1; @@ -1798,5 +1800,7 @@ ipmi_watchdog(void *arg, int period) splx(s); sc->sc_wdog_period = period; + printf("%s: watchdog %sabled\n", DEVNAME(sc), + (period == 0) ? "dis" : "en"); return (period); } |