From: Maurizio Lombardi Date: Mon, 17 Apr 2023 13:39:56 +0000 (+0200) Subject: nvme: fix rnlpt to_string() values. X-Git-Tag: v2.5~149 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=00909e8bc7e5a1b7a1129f8e18c60eedca0248f7;p=users%2Fsagi%2Fnvme-cli.git nvme: fix rnlpt to_string() values. "Reservation Notification Log Page Type" values do not start from 0x1 but from 0x0. Signed-off-by: Maurizio Lombardi --- diff --git a/nvme-print.c b/nvme-print.c index 8bd2174f..1ed34572 100644 --- a/nvme-print.c +++ b/nvme-print.c @@ -610,10 +610,10 @@ void nvme_show_lba_status_log(void *lba_status, __u32 size, static const char *resv_notif_to_string(__u8 type) { switch (type) { - case 0x1: return "Empty Log Page"; - case 0x2: return "Registration Preempted"; - case 0x3: return "Reservation Released"; - case 0x4: return "Reservation Preempted"; + case 0x0: return "Empty Log Page"; + case 0x1: return "Registration Preempted"; + case 0x2: return "Reservation Released"; + case 0x3: return "Reservation Preempted"; default: return "Reserved"; } }