diff --git a/0018-nvme-fix-rnlpt-to_string-values.patch b/0018-nvme-fix-rnlpt-to_string-values.patch new file mode 100644 index 0000000..9645b13 --- /dev/null +++ b/0018-nvme-fix-rnlpt-to_string-values.patch @@ -0,0 +1,35 @@ +From 00909e8bc7e5a1b7a1129f8e18c60eedca0248f7 Mon Sep 17 00:00:00 2001 +From: Maurizio Lombardi +Date: Mon, 17 Apr 2023 15:39:56 +0200 +Subject: [PATCH] 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 +--- + nvme-print.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +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"; + } + } +-- +2.31.1 + diff --git a/nvme-cli.spec b/nvme-cli.spec index f924e2c..01f041a 100644 --- a/nvme-cli.spec +++ b/nvme-cli.spec @@ -3,7 +3,7 @@ Name: nvme-cli Version: 1.16 -Release: 8%{?dist} +Release: 9%{?dist} Summary: NVMe management command line interface License: GPLv2+ @@ -28,6 +28,7 @@ Patch14: 0014-nvme-cli-Add-support-Telemetry-CRT-in-PEL.patch Patch15: 0015-fix-firmware-log-page-frs-variable-sign.patch Patch16: 0016-fix-file-permissions-nvme-print.c.patch Patch17: 0017-fabrics-Fix-ordering-for-auto-connect-services.patch +Patch18: 0018-nvme-fix-rnlpt-to_string-values.patch BuildRequires: libuuid-devel BuildRequires: gcc @@ -58,6 +59,7 @@ nvme-cli provides NVM-Express user space tooling for Linux. %patch15 -p1 %patch16 -p1 %patch17 -p1 +%patch18 -p1 %build @@ -116,6 +118,9 @@ if [ $1 -eq 1 ] || [ $1 -eq 2 ]; then fi %changelog +* Thu Apr 20 2023 Maurizio Lombardi - 1.16-9 +- Fix BZ #2187288 + * Wed Apr 05 2023 Maurizio Lombardi - 1.16-8 - Fix BZ #1954185