Skip to content

Commit

Permalink
ras-aer-handler: handle errors when running ipmitool
Browse files Browse the repository at this point in the history
Without that, Fedora build will produce warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  • Loading branch information
mchehab committed Jul 16, 2024
1 parent 69db9e8 commit d58c29a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ras-aer-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d58c29a

Please sign in to comment.