* PATCH: rasdaemon: Don't run ipmitool if use_ipmitool is false (#241)
@ 2026-07-23 7:41 Sergio Gelato
0 siblings, 0 replies; only message in thread
From: Sergio Gelato @ 2026-07-23 7:41 UTC (permalink / raw)
To: linux-edac; +Cc: Mauro Carvalho Chehab
[-- Attachment #1: Type: text/plain, Size: 268 bytes --]
The patch below addresses an issue observed on some systems, where rasdaemon
(and sh) would log a failure to invoke ipmitool. The issue has been reported
before (https://github.com/mchehab/rasdaemon/issues/241) by someone else but
is still not fixed in release 0.8.5.
[-- Attachment #2: 0001-Don-t-run-ipmitool-if-use_ipmitool-is-false.patch --]
[-- Type: text/x-diff, Size: 1918 bytes --]
From: Sergio Gelato <Sergio.Gelato@astro.su.se>
Date: Wed, 22 Jul 2026 11:17:12 +0200
Subject: Don't run ipmitool if use_ipmitool is false
It's inappropriate to try and invoke ipmitool when use_ipmitool is false.
This has been observed to cause spurious warnings on systems where ipmitool
is not installed, and may have worse effects where it is.
Signed-off-by: Sergio Gelato <Sergio.Gelato@astro.su.se>
diff --git a/ras-aer-handler.c b/ras-aer-handler.c
index 5d069f3..85d3df7 100644
--- a/ras-aer-handler.c
+++ b/ras-aer-handler.c
@@ -187,21 +187,23 @@ int ras_aer_event_handler(struct trace_seq *s,
* number, byte 16[7:3] is device number, byte 16[2:0] is
* function number
*/
- rc = sscanf(ev.dev_name, "%x:%x:%x.%x", &seg, &bus, &dev, &fn);
- if (rc == 4) {
- sel_data[1] = seg & 0xff;
- sel_data[2] = (seg & 0xff00) >> 8;
- sel_data[3] = bus;
- sel_data[4] = (((dev & 0x1f) << 3) | (fn & 0x7));
-
- snprintf(ipmi_add_sel, sizeof(ipmi_add_sel),
- "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]);
-
- rc = system(ipmi_add_sel);
+ if (use_ipmitool) {
+ rc = sscanf(ev.dev_name, "%x:%x:%x.%x", &seg, &bus, &dev, &fn);
+ if (rc == 4) {
+ sel_data[1] = seg & 0xff;
+ sel_data[2] = (seg & 0xff00) >> 8;
+ sel_data[3] = bus;
+ sel_data[4] = (((dev & 0x1f) << 3) | (fn & 0x7));
+
+ snprintf(ipmi_add_sel, sizeof(ipmi_add_sel),
+ "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]);
+
+ rc = system(ipmi_add_sel);
+ }
+ if (rc)
+ log(SYSLOG, LOG_WARNING, "Failed to execute ipmitool\n");
}
- if (rc)
- log(SYSLOG, LOG_WARNING, "Failed to execute ipmitool\n");
#endif
#ifdef HAVE_OPENBMC_UNIFIED_SEL
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-23 7:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 7:41 PATCH: rasdaemon: Don't run ipmitool if use_ipmitool is false (#241) Sergio Gelato
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.