summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-11-06 01:29:26 +0000
committermav <mav@FreeBSD.org>2012-11-06 01:29:26 +0000
commit48bd765ad7d8c6dff3f79738388d8075e9dc328d (patch)
treec8e562d7abf6bfad41684dd63d3fc4448501c608 /share
parent602e4e5a50796e99fe433474238c7df0f1573548 (diff)
downloadFreeBSD-src-48bd765ad7d8c6dff3f79738388d8075e9dc328d.zip
FreeBSD-src-48bd765ad7d8c6dff3f79738388d8075e9dc328d.tar.gz
Decode common state bits in getencstat output.
Diffstat (limited to 'share')
-rw-r--r--share/examples/ses/srcs/eltsub.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/share/examples/ses/srcs/eltsub.c b/share/examples/ses/srcs/eltsub.c
index cc976b6..c664895 100644
--- a/share/examples/ses/srcs/eltsub.c
+++ b/share/examples/ses/srcs/eltsub.c
@@ -180,7 +180,11 @@ stat2ascii(int eletype __unused, u_char *cstat)
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);
}
OpenPOWER on IntegriCloud