mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 19:02:09 +00:00
nvme-cli: fix compilation with GCC14
Wrong pointer type. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nvme-cli
|
||||
PKG_VERSION:=2.5
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/linux-nvme/nvme-cli/archive/refs/tags/v$(PKG_VERSION)
|
||||
|
||||
28
utils/nvme-cli/patches/010-gcc14.patch
Normal file
28
utils/nvme-cli/patches/010-gcc14.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
--- a/plugins/virtium/virtium-nvme.c
|
||||
+++ b/plugins/virtium/virtium-nvme.c
|
||||
@@ -32,14 +32,14 @@ static char vt_default_log_file_name[256
|
||||
struct vtview_log_header {
|
||||
char path[256];
|
||||
char test_name[256];
|
||||
- long time_stamp;
|
||||
+ time_t time_stamp;
|
||||
struct nvme_id_ctrl raw_ctrl;
|
||||
struct nvme_firmware_slot raw_fw;
|
||||
};
|
||||
|
||||
struct vtview_smart_log_entry {
|
||||
char path[256];
|
||||
- long time_stamp;
|
||||
+ time_t time_stamp;
|
||||
struct nvme_id_ns raw_ns;
|
||||
struct nvme_id_ctrl raw_ctrl;
|
||||
struct nvme_smart_log raw_smart;
|
||||
@@ -127,7 +127,7 @@ static void vt_convert_smart_data_to_hum
|
||||
|
||||
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);
|
||||
Reference in New Issue
Block a user