From: Tokunori Ikegami Date: Mon, 15 Apr 2024 14:31:24 +0000 (+0900) Subject: nvme-print: Use NVME_UNIT definitions X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d8338eb941ab52b51a3b1b39c7cc989003028d6e;p=users%2Fsagi%2Fnvme-cli.git nvme-print: Use NVME_UNIT definitions Use libnvme register definitions instead. Signed-off-by: Tokunori Ikegami --- diff --git a/nvme-print.c b/nvme-print.c index ef4b6534..81d0936b 100644 --- a/nvme-print.c +++ b/nvme-print.c @@ -354,13 +354,13 @@ const char *nvme_register_pmr_hsts_to_string(__u8 hsts) const char *nvme_register_unit_to_string(__u8 unit) { switch (unit) { - case 0: + case NVME_UNIT_B: return "Bytes"; - case 1: + case NVME_UNIT_1K: return "One KB"; - case 2: + case NVME_UNIT_1M: return "One MB"; - case 3: + case NVME_UNIT_1G: return "One GB"; default: break;