summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-09-27 17:59:56 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-09-27 17:59:56 +0000
commit60a0a7e3c62b9e1c46ae273f680e7ebdfa3d179d (patch)
tree4f7c12f99e4984bd31ba50ffda71d4b15d93334f /sys/arch/sparc64
parentf86e8ea4c4432272fc6344b9338247260a0b29db (diff)
Add sensor status for fan sensors.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/dev/lom.c6
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;
}