From 3b68d2b60d754b93f90af1d7b557cb1361fe6f3c Mon Sep 17 00:00:00 2001 From: John Audia Date: Thu, 3 Apr 2025 07:45:56 -0400 Subject: [PATCH] nvme-cli: update to 1.12 Bump to latest upstream release. Removed upstreamed: 021-pligins-netapp-add-include-of-libgen.h-for-basename.patch Manually rebased: 010-gcc14.patch Build system: x86/64 Build-tested: x86/64 Run-tested: x86/64 Signed-off-by: John Audia --- utils/nvme-cli/Makefile | 4 +-- utils/nvme-cli/patches/010-gcc14.patch | 10 +++---- .../020-nvme-print-add-fallback-for-.patch | 6 ++--- ...add-include-of-libgen.h-for-basename.patch | 26 ------------------- 4 files changed, 10 insertions(+), 36 deletions(-) delete mode 100644 utils/nvme-cli/patches/021-pligins-netapp-add-include-of-libgen.h-for-basename.patch diff --git a/utils/nvme-cli/Makefile b/utils/nvme-cli/Makefile index 90ad3983f..618194a5c 100644 --- a/utils/nvme-cli/Makefile +++ b/utils/nvme-cli/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nvme-cli -PKG_VERSION:=2.11 +PKG_VERSION:=2.12 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/linux-nvme/nvme-cli/archive/refs/tags/v$(PKG_VERSION) -PKG_HASH:=5e4dc73dbb488c6b1e6ad1c78d0c62b624076fcb0c052bd9039674a1dbd6517b +PKG_HASH:=bb6528d0528ccf5d05fbe8e90b82b7632cc0896ffcbe2f4c823ff2de1e79693e PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=LICENSE diff --git a/utils/nvme-cli/patches/010-gcc14.patch b/utils/nvme-cli/patches/010-gcc14.patch index 5badc8b07..c97325d89 100644 --- a/utils/nvme-cli/patches/010-gcc14.patch +++ b/utils/nvme-cli/patches/010-gcc14.patch @@ -4,8 +4,8 @@ capacity = le64_to_cpu(smart->raw_ns.nsze) * lba; -- snprintf(tempbuff, sizeof(tempbuff), "log;%s;%lu;%s;%s;%-.*s;", smart->raw_ctrl.sn, smart->time_stamp, smart->path, -+ snprintf(tempbuff, sizeof(tempbuff), "log;%s;%" PRId64 ";%s;%s;%-.*s;", smart->raw_ctrl.sn, smart->time_stamp, smart->path, - smart->raw_ctrl.mn, (int)sizeof(smart->raw_ctrl.fr), smart->raw_ctrl.fr); - strcpy(text, tempbuff); - snprintf(tempbuff, sizeof(tempbuff), "Capacity;%lf;", capacity / 1000000000); +- snprintf(tempbuff, sizeof(tempbuff), "log;%s;%llu;%s;%s;%-.*s;", smart->raw_ctrl.sn, ++ snprintf(tempbuff, sizeof(tempbuff), "log;%s;%" PRId64 ";%s;%s;%-.*s;", smart->raw_ctrl.sn, + (unsigned long long)smart->time_stamp, smart->path, + smart->raw_ctrl.mn, (int)sizeof(smart->raw_ctrl.fr), + smart->raw_ctrl.fr); diff --git a/utils/nvme-cli/patches/020-nvme-print-add-fallback-for-.patch b/utils/nvme-cli/patches/020-nvme-print-add-fallback-for-.patch index 50df4945d..87c14900a 100644 --- a/utils/nvme-cli/patches/020-nvme-print-add-fallback-for-.patch +++ b/utils/nvme-cli/patches/020-nvme-print-add-fallback-for-.patch @@ -18,9 +18,9 @@ Signed-off-by: Daniel Néri --- a/nvme-print.c +++ b/nvme-print.c -@@ -797,6 +797,10 @@ static bool is_fahrenheit_country(const - return false; - } +@@ -832,6 +832,10 @@ static bool is_fahrenheit_country(const + #define LC_MEASUREMENT LC_ALL + #endif +#ifndef LC_MEASUREMENT +#define LC_MEASUREMENT LC_ALL diff --git a/utils/nvme-cli/patches/021-pligins-netapp-add-include-of-libgen.h-for-basename.patch b/utils/nvme-cli/patches/021-pligins-netapp-add-include-of-libgen.h-for-basename.patch deleted file mode 100644 index 016cdbcb1..000000000 --- a/utils/nvme-cli/patches/021-pligins-netapp-add-include-of-libgen.h-for-basename.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ac4818952c872ba465a2d0f48634f9a79aae064f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20N=C3=A9ri?= -Date: Mon, 11 Nov 2024 22:34:57 +0100 -Subject: [PATCH] plugins/netapp: add include of libgen.h for basename(3) - prototype -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fixes build with musl libc. - -Signed-off-by: Daniel Néri ---- - plugins/netapp/netapp-nvme.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/plugins/netapp/netapp-nvme.c -+++ b/plugins/netapp/netapp-nvme.c -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - #include "common.h" - #include "nvme.h"