Author: mav
Date: Tue Nov  6 01:29:26 2012
New Revision: 242647
URL: http://svnweb.freebsd.org/changeset/base/242647

Log:
  Decode common state bits in getencstat output.

Modified:
  head/share/examples/ses/srcs/eltsub.c

Modified: head/share/examples/ses/srcs/eltsub.c
==============================================================================
--- head/share/examples/ses/srcs/eltsub.c       Tue Nov  6 01:18:53 2012        
(r242646)
+++ head/share/examples/ses/srcs/eltsub.c       Tue Nov  6 01:29:26 2012        
(r242647)
@@ -180,7 +180,11 @@ stat2ascii(int eletype __unused, u_char 
        static char ebuf[256], *scode;
 
        scode = scode2ascii(cstat[0]);
-       sprintf(ebuf, "status: %s (0x%02x 0x%02x 0x%02x 0x%02x)",
-           scode, cstat[0], cstat[1], cstat[2], cstat[3]);
+       sprintf(ebuf, "status: %s%s%s%s (0x%02x 0x%02x 0x%02x 0x%02x)",
+           scode,
+           (cstat[0] & 0x40) ? ", Prd.Fail" : "",
+           (cstat[0] & 0x20) ? ", Disabled" : "",
+           (cstat[0] & 0x10) ? ", Swapped" : "",
+           cstat[0], cstat[1], cstat[2], cstat[3]);
        return (ebuf);
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to