summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-12-11 10:58:26 +0000
committerbapt <bapt@FreeBSD.org>2015-12-11 10:58:26 +0000
commitbbf8b22f967067189bd345d1e089c75332b6a329 (patch)
treee4df187ea92a379b2d64cc1f0bdd27a473422765
parent8425221d146fb2d48434c543c50402cf26901c20 (diff)
downloadFreeBSD-src-bbf8b22f967067189bd345d1e089c75332b6a329.zip
FreeBSD-src-bbf8b22f967067189bd345d1e089c75332b6a329.tar.gz
sesutil: fix map not printing the status of the LED device in an array
Sponsored by: Gandi.net
-rw-r--r--usr.sbin/sesutil/eltsub.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/sesutil/eltsub.c b/usr.sbin/sesutil/eltsub.c
index dae02fe..0e79bd2 100644
--- a/usr.sbin/sesutil/eltsub.c
+++ b/usr.sbin/sesutil/eltsub.c
@@ -185,10 +185,10 @@ stat2ascii(int eletype, u_char *cstat)
(cstat[0] & 0x40) ? ", Prd.Fail" : "",
(cstat[0] & 0x20) ? ", Disabled" : "",
(cstat[0] & 0x10) ? ", Swapped" : "",
- (eletype == ELMTYP_DEVICE && (cstat[2] & 0x02)) ?
- ", LED=Locate" : "",
- (eletype == ELMTYP_DEVICE && (cstat[3] & 0x20)) ?
- ", LED=Fault" : "",
+ ((eletype == ELMTYP_DEVICE || eletype == ELMTYP_ARRAY_DEV)
+ && (cstat[2] & 0x02)) ? ", LED=Locate" : "",
+ ((eletype == ELMTYP_DEVICE || eletype == ELMTYP_ARRAY_DEV)
+ && (cstat[3] & 0x20)) ? ", LED=Fault" : "",
cstat[0], cstat[1], cstat[2], cstat[3]);
return (ebuf);
}
OpenPOWER on IntegriCloud