From 250eb15f92e1bd6c554e82d5d467e8aa8c19c449 Mon Sep 17 00:00:00 2001 From: Zdenek Styblik Date: Sun, 23 Mar 2014 07:51:05 +0100 Subject: [PATCH] ID: 297 - don't print-out SEL entry if ID not present Don't print-out SEL log entry if SEL Record ID isn't present. Patch-by: Mamatha Inamdar --- lib/ipmi_sel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ipmi_sel.c b/lib/ipmi_sel.c index 63ecbcf..21ce0c4 100644 --- a/lib/ipmi_sel.c +++ b/lib/ipmi_sel.c @@ -2898,7 +2898,11 @@ ipmi_sel_show_entry(struct ipmi_intf * intf, int argc, char ** argv) lprintf(LOG_DEBUG, "Looking up SEL entry 0x%x", id); /* lookup SEL entry based on ID */ - ipmi_sel_get_std_entry(intf, id, &evt); + if (!ipmi_sel_get_std_entry(intf, id, &evt)) { + lprintf(LOG_DEBUG, "SEL Entry 0x%x not found.", id); + rc = (-1); + continue; + } if (evt.sel_type.standard_type.sensor_num == 0 && evt.sel_type.standard_type.sensor_type == 0 && evt.record_type == 0) { lprintf(LOG_WARN, "SEL Entry 0x%x not found", id); rc = -1;