diff options
author | bapt <bapt@FreeBSD.org> | 2015-12-11 10:58:26 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-12-11 10:58:26 +0000 |
commit | bbf8b22f967067189bd345d1e089c75332b6a329 (patch) | |
tree | e4df187ea92a379b2d64cc1f0bdd27a473422765 /usr.sbin | |
parent | 8425221d146fb2d48434c543c50402cf26901c20 (diff) | |
download | FreeBSD-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
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sesutil/eltsub.c | 8 |
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); } |