Skip to content

Commit

Permalink
nvme-print: Use NVME_UNIT definitions
Browse files Browse the repository at this point in the history
Use libnvme register definitions instead.

Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
  • Loading branch information
ikegami-t authored and igaw committed Apr 24, 2024
1 parent c6d6a07 commit d8338eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nvme-print.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d8338eb

Please sign in to comment.