diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2007-05-31 18:34:13 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2007-05-31 18:34:13 +0000 |
commit | 0e3633f0ffab31dc8a1a9d47a9ef51a923895753 (patch) | |
tree | 30f64ad9b4bcffc13361af76efc25c2858fac957 | |
parent | 304dfe82b534c19061e4b1418a40207c820253b5 (diff) |
if poking the controller fails for whatever reason the drives'
sensor status will still be marked as ok (or etc..)
thus erroneously reporting value as valid.
this nice diff was from mickey
-rw-r--r-- | sys/dev/ic/ami.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index 4cb9650e03c..518707308b9 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.181 2007/05/29 22:17:50 todd Exp $ */ +/* $OpenBSD: ami.c,v 1.182 2007/05/31 18:34:12 dlg Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -2502,8 +2502,13 @@ ami_refresh_sensors(void *arg) int i; if (ami_mgmt(sc, AMI_FCOP, AMI_FC_RDCONF, 0, 0, sizeof(*sc->sc_bd), - sc->sc_bd)) + sc->sc_bd)) { + for (i = 0; i < sc->sc_nunits; i++) { + sc->sc_sensors[i].value = 0; /* unknown */ + sc->sc_sensors[i].status = SENSOR_S_UNKNOWN; + } return; + } for (i = 0; i < sc->sc_nunits; i++) { switch (sc->sc_bd->ald[i].adl_status) { |