Date: Fri, 11 Dec 2015 10:58:26 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292092 - head/usr.sbin/sesutil Message-ID: <201512111058.tBBAwQKe020938@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Fri Dec 11 10:58:26 2015 New Revision: 292092 URL: https://svnweb.freebsd.org/changeset/base/292092 Log: sesutil: fix map not printing the status of the LED device in an array Sponsored by: Gandi.net Modified: head/usr.sbin/sesutil/eltsub.c Modified: head/usr.sbin/sesutil/eltsub.c ============================================================================== --- head/usr.sbin/sesutil/eltsub.c Fri Dec 11 07:24:25 2015 (r292091) +++ head/usr.sbin/sesutil/eltsub.c Fri Dec 11 10:58:26 2015 (r292092) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512111058.tBBAwQKe020938>