]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
Fixed malformed json output from sanitize-log.
authorGregory C. Oakes <gregoryoakes@fastmail.com>
Thu, 12 Mar 2020 17:36:56 +0000 (12:36 -0500)
committerKeith Busch <kbusch@kernel.org>
Thu, 19 Mar 2020 15:09:56 +0000 (08:09 -0700)
nvme-print.c

index 1aa1e273ba53bb6a4aa195e26489d395c52c0c47..579ac100e64138118eda3249431ea5317439f00f 100644 (file)
@@ -3670,8 +3670,10 @@ void nvme_show_sanitize_log(struct nvme_sanitize_log_page *sanitize,
 
        if (flags & BINARY)
                d_raw((unsigned char *)sanitize, sizeof(*sanitize));
-       else if (flags & JSON)
+       else if (flags & JSON) {
                json_sanitize_log(sanitize, devname);
+               return;
+       }
 
        printf("Sanitize Progress                      (SPROG) :  %u",
               le16_to_cpu(sanitize->progress));