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>
This commit is contained in:
Bing-Hua Wang 2020-11-12 15:35:56 +08:00 committed by Alexander Amelkin
parent 5ac7f6a54e
commit 4d4f29f0b6

View File

@ -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.",