diff options
author | Bing-Hua Wang <binghuawang@ami.com> | 2020-11-12 15:35:56 +0800 |
---|---|---|
committer | Alexander Amelkin <mocbuhtig@amelkin.msk.ru> | 2022-02-07 14:35:28 +0300 |
commit | 4d4f29f0b60b395941c3e7768ce43ccb890da5f7 (patch) | |
tree | 21dad5222bbd44f9c3fb6a9ada1b499d127b42f1 | |
parent | 5ac7f6a54e0a416fc37e962c2be87b16821cc771 (diff) | |
download | ipmitool-4d4f29f0b60b395941c3e7768ce43ccb890da5f7.tar.gz |
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 <binghuawang@ami.com>
-rw-r--r-- | lib/ipmi_sel.c | 20 |
1 files changed, 0 insertions, 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.", |