From a93fe21b07787868bcb0311ba5b186aae040ca47 Mon Sep 17 00:00:00 2001 From: Aleksey Vasilenko Date: Sun, 9 Jun 2024 12:12:33 +0300 Subject: [PATCH] nvme-cli: update to 2.9.1 - Add patch to compile on musl Signed-off-by: Aleksey Vasilenko --- utils/nvme-cli/Makefile | 6 ++--- utils/nvme-cli/patches/020-replace_uint16_t | 28 +++++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 utils/nvme-cli/patches/020-replace_uint16_t diff --git a/utils/nvme-cli/Makefile b/utils/nvme-cli/Makefile index 4e52be3313..7502943b13 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.5 -PKG_RELEASE:=2 +PKG_VERSION:=2.9.1 +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:=e84bdba276aadcddda8cf5d412e934cc5673af15132ea02180deb5d06af73146 +PKG_HASH:=4b61684a1d23de1d9d0abd3f273799c60256c0e2a2e68a790d7945183fe33874 PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=LICENSE diff --git a/utils/nvme-cli/patches/020-replace_uint16_t b/utils/nvme-cli/patches/020-replace_uint16_t new file mode 100644 index 0000000000..0e247f0670 --- /dev/null +++ b/utils/nvme-cli/patches/020-replace_uint16_t @@ -0,0 +1,28 @@ +From 650070ad5d4a97fc87f9018743e3b566deba36c8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 21 May 2024 14:09:32 -0700 +Subject: [PATCH] plugins/ssstc: Replace __uint16_t with uint16_t + +uint16_t is ISO defined and comes from stdint.h, makes it +portable across glibc and musl on linux. + +Signed-off-by: Khem Raj +--- + plugins/ssstc/ssstc-nvme.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/plugins/ssstc/ssstc-nvme.c ++++ b/plugins/ssstc/ssstc-nvme.c +@@ -64,9 +64,9 @@ void show_ssstc_add_smart_log_jsn(struct + unsigned int nsid, const char *devname) + { + struct json_object *root, *entry_stats, *dev_stats, *multi; +- __uint16_t wear_level_min = 0; +- __uint16_t wear_level_max = 0; +- __uint16_t wear_level_avg = 0; ++ uint16_t wear_level_min = 0; ++ uint16_t wear_level_max = 0; ++ uint16_t wear_level_avg = 0; + uint64_t raw_val = 0; + + root = json_create_object(); -- 2.30.2