https://bugs.gentoo.org/955092 https://github.com/ibm-power-utilities/powerpc-utils/issues/109 https://github.com/ibm-power-utilities/powerpc-utils/pull/114 From 7834f565beca5fb765479c4639e34fa46759eb15 Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Mon, 4 Aug 2025 13:11:00 +0200 Subject: [PATCH 1/3] pseries_platform.h: Fix ifdef guard typo Signed-off-by: Michal Suchanek --- src/common/pseries_platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/pseries_platform.h b/src/common/pseries_platform.h index 440c3e60..5fa12ff9 100644 --- a/src/common/pseries_platform.h +++ b/src/common/pseries_platform.h @@ -19,7 +19,7 @@ */ #ifndef PLATFORM_H -#define PLARFORM_H +#define PLATFORM_H #define PLATFORM_FILE "/proc/cpuinfo" From df4a683676a9826b048cd52509437fd128341a70 Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Mon, 4 Aug 2025 13:25:38 +0200 Subject: [PATCH 2/3] nvram.c: Correct librtas function prototypes Signed-off-by: Michal Suchanek --- src/nvram.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/nvram.c b/src/nvram.c index 1987c3d9..45a61ebf 100644 --- a/src/nvram.c +++ b/src/nvram.c @@ -886,6 +886,8 @@ dump_errlog(struct nvram *nvram) return 0; } +struct rtas_event; + /** * dump_rtas_event_entry * @brief Dump event-scan data. @@ -901,11 +903,11 @@ dump_errlog(struct nvram *nvram) int dump_rtas_event_entry(char *data, int len) { - void *rtas_event; + struct rtas_event *rtas_event; void *handle; - void *(*parse_rtas_event)(); - void (*rtas_print_event)(); - void (*cleanup_rtas_event)(); + struct rtas_event *(*parse_rtas_event)(char *, int); + int (*rtas_print_event)(FILE *, struct rtas_event *, int); + int (*cleanup_rtas_event)(struct rtas_event *); handle = dlopen("/usr/lib/librtasevent.so", RTLD_LAZY); if (handle == NULL) From 3c147886126ac6c72776b99c043538c251a8703e Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Mon, 4 Nov 2024 11:39:06 +0100 Subject: [PATCH 3/3] sys_ident: Quiet strncpy warning The string is terminated by explicit NUL assignement below, use memcpy instead of strncpy. Signed-off-by: Michal Suchanek --- src/sys_ident.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sys_ident.c b/src/sys_ident.c index 2c5c06b4..0d88a2db 100644 --- a/src/sys_ident.c +++ b/src/sys_ident.c @@ -364,7 +364,7 @@ print_sys_part_id(void) temp[2] = '\0'; prefix = atoi(temp); - strncpy(cc, sys_id+6, 2); + memcpy(cc, sys_id+6, 2); cc[2] = '\0'; strncpy(sssss, sys_id+8, 5); @@ -386,7 +386,7 @@ print_sys_part_id(void) close(fd); - strncpy(tttt, model+4, 4); + memcpy(tttt, model+4, 4); tttt[4] = '\0'; fd = open("/proc/device-tree/ibm,partition-no", O_RDONLY);