diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2022-07-02 03:50:07 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2022-07-02 03:50:07 +0000 |
commit | 1861523da54dbb1dac823f754156e7e67f2768cb (patch) | |
tree | 6328e513623a1dd3f9409ee050d656016d1013e2 /lib/sg_pr2serr.c | |
parent | 30842a3103045e471ec8169f09135bb6766e5e1d (diff) | |
download | sg3_utils-1861523da54dbb1dac823f754156e7e67f2768cb.tar.gz |
sg3_utils.spec: change tarball extension from .tgz to .tar.gz ; fix build issue with Fedora 36; minor work
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@957 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'lib/sg_pr2serr.c')
-rw-r--r-- | lib/sg_pr2serr.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/sg_pr2serr.c b/lib/sg_pr2serr.c index ccebaf86..be07a2e1 100644 --- a/lib/sg_pr2serr.c +++ b/lib/sg_pr2serr.c @@ -317,9 +317,19 @@ sgj_start(const char * util_name, const char * ver_str, int argc, jv2p = json_object_push((json_value *)jvp, "utility_invoked", json_object_new(0)); } - if (jsp->pr_output && jv2p) + if (jsp->pr_output && jv2p) { jsp->outputp = json_object_push((json_value *)jv2p, "output", json_array_new(0)); + if (jsp->pr_leadin && (jsp->verbose > 3)) { + char * bp = (char *)calloc(4096, 1); + + if (bp) { + sg_json_usage(0, bp, 4096); + sgj_pr_str_output(jsp, bp, strlen(bp)); + free(bp); + } + } + } return jvp; } @@ -1014,7 +1024,7 @@ sgj_get_designation_descriptor(sgj_state * jsp, sgj_opaque_p jop, sg_get_unaligned_be64(ip + 8)); break; default: - sgj_add_nv_s(jsp, jop, "eui_64", "decoding falied"); + sgj_add_nv_s(jsp, jop, "eui_64", "decoding failed"); break; } break; |