From d8338eb941ab52b51a3b1b39c7cc989003028d6e Mon Sep 17 00:00:00 2001 From: Tokunori Ikegami Date: Mon, 15 Apr 2024 23:31:24 +0900 Subject: [PATCH] nvme-print: Use NVME_UNIT definitions Use libnvme register definitions instead. Signed-off-by: Tokunori Ikegami --- nvme-print.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- 2.51.0