diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-09-27 17:59:56 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-09-27 17:59:56 +0000 |
commit | 60a0a7e3c62b9e1c46ae273f680e7ebdfa3d179d (patch) | |
tree | 4f7c12f99e4984bd31ba50ffda71d4b15d93334f /sys/arch/sparc64 | |
parent | f86e8ea4c4432272fc6344b9338247260a0b29db (diff) |
Add sensor status for fan sensors.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/dev/lom.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/sparc64/dev/lom.c b/sys/arch/sparc64/dev/lom.c index 84aaa92e362..9ce7844d0a3 100644 --- a/sys/arch/sparc64/dev/lom.c +++ b/sys/arch/sparc64/dev/lom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lom.c,v 1.13 2009/09/27 17:01:15 kettenis Exp $ */ +/* $OpenBSD: lom.c,v 1.14 2009/09/27 17:59:55 kettenis Exp $ */ /* * Copyright (c) 2009 Mark Kettenis * @@ -751,6 +751,10 @@ lom_refresh(void *arg) } sc->sc_fan[i].value = (60 * sc->sc_fan_cal[i] * val) / 100; + if (val < sc->sc_fan_low[i]) + sc->sc_fan[i].status = SENSOR_S_CRIT; + else + sc->sc_fan[i].status = SENSOR_S_OK; sc->sc_fan[i].flags &= ~SENSOR_FINVALID; } |