From 1861523da54dbb1dac823f754156e7e67f2768cb Mon Sep 17 00:00:00 2001 From: Douglas Gilbert Date: Sat, 2 Jul 2022 03:50:07 +0000 Subject: 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 --- lib/sg_pr2serr.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/sg_pr2serr.c') 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; -- cgit v1.2.3