From: Jeff Lien Date: Thu, 21 Jun 2018 18:58:17 +0000 (-0500) Subject: NVMe-CLI Fix id-ns fpi field when Human Readable option selected. X-Git-Tag: v1.6~16 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1e13bc02be3914a4bed97290b304d63b93c31adf;p=users%2Fsagi%2Fnvme-cli.git NVMe-CLI Fix id-ns fpi field when Human Readable option selected. Currently when fpi = 0, the Format Progress Indicator Remaining is 100% and should be 0%. This patch fixes that condition. Signed-off-by: Jeff Lien Signed-off-by: Keith Busch --- diff --git a/nvme-print.c b/nvme-print.c index 4e7cb9fa..25a4e034 100644 --- a/nvme-print.c +++ b/nvme-print.c @@ -573,7 +573,7 @@ static void show_nvme_id_ns_fpi(__u8 fpi) fpis, fpis ? "" : "Not "); if (fpis || (!fpis && fpii)) printf(" [6:0] : %#x\tFormat Progress Indicator (Remaining %d%%)\n", - fpii, 100 - fpii); + fpii, fpii); printf("\n"); }