summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2007-05-31 18:34:12 +0000
committerdlg <dlg@openbsd.org>2007-05-31 18:34:12 +0000
commitd885cf852ee6e8266774e0704678ae9197a5dcd8 (patch)
treec0752c6531c5f799c4f27cbdab6f7ce8b31ef3b9
parentimport the initial Myrinet Myri-10G myx(4) manpage (diff)
downloadwireguard-openbsd-d885cf852ee6e8266774e0704678ae9197a5dcd8.tar.xz
wireguard-openbsd-d885cf852ee6e8266774e0704678ae9197a5dcd8.zip
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.c9
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) {