mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
In Get SEL Info, if the BMC returns a date of 0x00000000 of 0xffffffff,
print "Not available" instead of attempting to interpret the date.
This commit is contained in:
parent
b42902f880
commit
33cad9b907
@ -168,6 +168,9 @@ ipmi_sel_get_info(struct ipmi_intf * intf)
|
|||||||
struct ipmi_rq req;
|
struct ipmi_rq req;
|
||||||
uint16_t e, f;
|
uint16_t e, f;
|
||||||
int pctfull = 0;
|
int pctfull = 0;
|
||||||
|
uint32_t fs = 0xffffffff;
|
||||||
|
uint32_t zeros = 0;
|
||||||
|
|
||||||
|
|
||||||
memset(&req, 0, sizeof(req));
|
memset(&req, 0, sizeof(req));
|
||||||
req.msg.netfn = IPMI_NETFN_STORAGE;
|
req.msg.netfn = IPMI_NETFN_STORAGE;
|
||||||
@ -202,10 +205,22 @@ ipmi_sel_get_info(struct ipmi_intf * intf)
|
|||||||
}
|
}
|
||||||
printf("Percent Used : %d%%\n", pctfull);
|
printf("Percent Used : %d%%\n", pctfull);
|
||||||
|
|
||||||
|
|
||||||
|
if ((!memcmp(rsp->data + 5, &fs, 4)) ||
|
||||||
|
(!memcmp(rsp->data + 5, &zeros, 4)))
|
||||||
|
printf("Last Add Time : Not Available\n");
|
||||||
|
else
|
||||||
printf("Last Add Time : %s\n",
|
printf("Last Add Time : %s\n",
|
||||||
ipmi_sel_timestamp(buf2long(rsp->data + 5)));
|
ipmi_sel_timestamp(buf2long(rsp->data + 5)));
|
||||||
|
|
||||||
|
if ((!memcmp(rsp->data + 9, &fs, 4)) ||
|
||||||
|
(!memcmp(rsp->data + 9, &zeros, 4)))
|
||||||
|
printf("Last Add Time : Not Available\n");
|
||||||
|
else
|
||||||
printf("Last Del Time : %s\n",
|
printf("Last Del Time : %s\n",
|
||||||
ipmi_sel_timestamp(buf2long(rsp->data + 9)));
|
ipmi_sel_timestamp(buf2long(rsp->data + 9)));
|
||||||
|
|
||||||
|
|
||||||
printf("Overflow : %s\n",
|
printf("Overflow : %s\n",
|
||||||
rsp->data[13] & 0x80 ? "true" : "false");
|
rsp->data[13] & 0x80 ? "true" : "false");
|
||||||
printf("Delete cmd : %ssupported\n",
|
printf("Delete cmd : %ssupported\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user