aboutsummaryrefslogtreecommitdiff
path: root/lib/sg_pr2serr.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2022-08-18 19:46:38 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2022-08-18 19:46:38 +0000
commit7e7308a2dbdec4c900b0805ad94324d3a288a163 (patch)
treec6c84399abcab97cc9bb0657f0734e0aa56a917d /lib/sg_pr2serr.c
parent98b99ad2ab348bbba1676b95a8895f12ee48fd31 (diff)
downloadsg3_utils-7e7308a2dbdec4c900b0805ad94324d3a288a163.tar.gz
sg_inq+sg_vpd: more updates but not finished
The sg_inq+sg_inq work is mainly JSON additions. sg_vpd has a new --sinq_inraw=RFN option. Update and place names for the 64 TapeAlert flags in the library. This improves TapeAlert reporting for sg_inq, sg_vpd and sg_logs. Refine the description of the VPD page merge of processing for sg_inq and sg_vpd to only include _T10_ defined pages, so the vendor specific VPD page processings of those utilities are still separate. git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@969 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'lib/sg_pr2serr.c')
-rw-r--r--lib/sg_pr2serr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sg_pr2serr.c b/lib/sg_pr2serr.c
index 52a4d000..5112fbfb 100644
--- a/lib/sg_pr2serr.c
+++ b/lib/sg_pr2serr.c
@@ -669,11 +669,12 @@ void
sgj_js_nv_ihex_nex(sgj_state * jsp, sgj_opaque_p jop, const char * name,
int64_t val_i, bool hex_as_well, const char * nex_s)
{
- bool as_hex = jsp->pr_hex && hex_as_well;
- bool as_nex = jsp->pr_name_ex && nex_s;
+ bool as_hex, as_nex;
if ((NULL == jsp) || (! jsp->pr_as_json))
return;
+ as_hex = jsp->pr_hex && hex_as_well;
+ as_nex = jsp->pr_name_ex && nex_s;
if (! (as_hex || as_nex))
sgj_js_nv_i(jsp, jop, name, val_i);
else {