From 4d4f29f0b60b395941c3e7768ce43ccb890da5f7 Mon Sep 17 00:00:00 2001 From: Bing-Hua Wang Date: Thu, 12 Nov 2020 15:35:56 +0800 Subject: [PATCH] sel: Remove redundant "Reserve SEL" There is no need to reserve SEL when doing "sel list" and "sel get" since we don't do partial get in both commands, and we didn't even use the reservation ID returned by "Reserve SEL". Signed-off-by: Bing-Hua Wang --- lib/ipmi_sel.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/lib/ipmi_sel.c b/lib/ipmi_sel.c index 47c2de4..4440fda 100644 --- a/lib/ipmi_sel.c +++ b/lib/ipmi_sel.c @@ -2273,21 +2273,6 @@ __ipmi_sel_savelist_entries(struct ipmi_intf * intf, int count, const char * sav return 0; } - memset(&req, 0, sizeof(req)); - req.msg.netfn = IPMI_NETFN_STORAGE; - req.msg.cmd = IPMI_CMD_RESERVE_SEL; - - rsp = intf->sendrecv(intf, &req); - if (!rsp) { - lprintf(LOG_ERR, "Reserve SEL command failed"); - return -1; - } - if (rsp->ccode) { - lprintf(LOG_ERR, "Reserve SEL command failed: %s", - val2str(rsp->ccode, completion_code_vals)); - return -1; - } - if (count < 0) { /** Show only the most recent 'count' records. */ int i; @@ -2923,11 +2908,6 @@ ipmi_sel_show_entry(struct ipmi_intf * intf, int argc, char ** argv) return (-1); } - if (ipmi_sel_reserve(intf) == 0) { - lprintf(LOG_ERR, "Unable to reserve SEL"); - return (-1); - } - for (i = 0; i < argc; i++) { if (str2ushort(argv[i], &id) != 0) { lprintf(LOG_ERR, "Given SEL ID '%s' is invalid.",