From d58c29a64ede74a1bc301f82fb02442fd57d4ef0 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 16 Jul 2024 10:37:23 +0200 Subject: [PATCH] ras-aer-handler: handle errors when running ipmitool Without that, Fedora build will produce warnings. Signed-off-by: Mauro Carvalho Chehab --- ras-aer-handler.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ras-aer-handler.c b/ras-aer-handler.c index 7fca00d..414d89e 100644 --- a/ras-aer-handler.c +++ b/ras-aer-handler.c @@ -71,7 +71,7 @@ int ras_aer_event_handler(struct trace_seq *s, #ifdef HAVE_AMP_NS_DECODE char ipmi_add_sel[105]; uint8_t sel_data[5]; - int seg, bus, dev, fn; + int seg, bus, dev, fn, rc; #endif /* @@ -190,7 +190,9 @@ int ras_aer_event_handler(struct trace_seq *s, "ipmitool raw 0x0a 0x44 0x00 0x00 0xc0 0x00 0x00 0x00 0x00 0x3a 0xcd 0x00 0xc0 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x", sel_data[0], sel_data[1], sel_data[2], sel_data[3], sel_data[4]); - system(ipmi_add_sel); + rc = system(ipmi_add_sel); + if (rc) + log(SYSLOG, LOG_WARNING, "Failed to execute ipmitool\n"); #endif return 0;