]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme: Masks SSTAT in sanize-log output
authorDaniel Wagner <dwagner@suse.de>
Thu, 25 Aug 2022 07:36:16 +0000 (09:36 +0200)
committerDaniel Wagner <dwagner@suse.de>
Thu, 25 Aug 2022 07:36:16 +0000 (09:36 +0200)
The sanitize->sstat needs to be mask. We do this for the JSON output
but not for the normal shell output.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
nvme-print.c

index e1af825cd7f5f1717b63ac8450de05e950451792..7deb2162703afa919ed89d7ba0b4eaff0f50c2df 100644 (file)
@@ -6502,7 +6502,7 @@ void nvme_show_sanitize_log(struct nvme_sanitize_log_page *sanitize,
                printf("\n");
 
        printf("Sanitize Status                        (SSTAT) :  %#x\n",
-               le16_to_cpu(sanitize->sstat));
+               le16_to_cpu(sanitize->sstat) & NVME_SANITIZE_SSTAT_STATUS_MASK);
        if (human)
                nvme_show_sanitize_log_sstat(le16_to_cpu(sanitize->sstat));