mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
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:
parent
5ac7f6a54e
commit
4d4f29f0b6
@ -2273,21 +2273,6 @@ __ipmi_sel_savelist_entries(struct ipmi_intf * intf, int count, const char * sav
|
|||||||
return 0;
|
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) {
|
if (count < 0) {
|
||||||
/** Show only the most recent 'count' records. */
|
/** Show only the most recent 'count' records. */
|
||||||
int i;
|
int i;
|
||||||
@ -2923,11 +2908,6 @@ ipmi_sel_show_entry(struct ipmi_intf * intf, int argc, char ** argv)
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ipmi_sel_reserve(intf) == 0) {
|
|
||||||
lprintf(LOG_ERR, "Unable to reserve SEL");
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
if (str2ushort(argv[i], &id) != 0) {
|
if (str2ushort(argv[i], &id) != 0) {
|
||||||
lprintf(LOG_ERR, "Given SEL ID '%s' is invalid.",
|
lprintf(LOG_ERR, "Given SEL ID '%s' is invalid.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user