mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
Output format changes
This commit is contained in:
parent
81ae330e9b
commit
45a0fa0324
@ -337,7 +337,7 @@ ipmi_sdr_print_sensor_full(struct ipmi_intf * intf,
|
||||
memset(sval, 0, sizeof(sval));
|
||||
if (validread) {
|
||||
i += snprintf(sval, sizeof(sval), "%.*f %s",
|
||||
(val==(int)val) ? 0 : 3, val,
|
||||
(val==(int)val) ? 0 : 2, val,
|
||||
do_unit ? unitstr : "");
|
||||
} else {
|
||||
i += snprintf(sval, sizeof(sval), "no reading ");
|
||||
@ -549,6 +549,17 @@ ipmi_sdr_print_sensor_compact(struct ipmi_intf * intf,
|
||||
else
|
||||
state = csv_output ? "Not Present" : "Not Present ";
|
||||
break;
|
||||
case 0x10: /* event logging disabled */
|
||||
if (rsp->data[2] & 0x10)
|
||||
state = csv_output ? "Log Full" : "Log Full ";
|
||||
else if (rsp->data[2] & 0x04)
|
||||
state = csv_output ? "Log Clear" : "Log Clear ";
|
||||
else
|
||||
{
|
||||
sprintf(temp, "0x%02x", rsp->data[2]);
|
||||
state = temp;
|
||||
}
|
||||
break;
|
||||
case 0x21: /* slot/connector */
|
||||
if (rsp->data[2] & 0x04)
|
||||
state = csv_output ? "Installed" : "Installed ";
|
||||
@ -611,7 +622,7 @@ ipmi_sdr_print_sensor_eventonly(struct ipmi_intf * intf,
|
||||
printf("\n");
|
||||
}
|
||||
else {
|
||||
char * state = "Not Readable ";
|
||||
char * state = "Event-Only ";
|
||||
if (csv_output)
|
||||
printf("%s,%s,ns", sensor->id_code ? desc : NULL, state);
|
||||
else
|
||||
@ -709,7 +720,7 @@ ipmi_sdr_print_fru_locator(struct ipmi_intf * intf,
|
||||
else
|
||||
printf("%-16s | ", fru->id_code ? desc : NULL);
|
||||
|
||||
printf("%s FRU @%02Xh %x.%x",
|
||||
printf("%s FRU @%02Xh %02x.%x",
|
||||
(fru->logical) ? "Log" : "Phy",
|
||||
fru->device_id,
|
||||
fru->entity.id, fru->entity.instance);
|
||||
|
@ -202,7 +202,7 @@ ipmi_sel_get_std_entry(struct ipmi_intf * intf, unsigned short * next_id)
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (!rsp || rsp->ccode) {
|
||||
printf("Error%x in Get SEL Entry %x Command\n",
|
||||
printf("Error %x in Get SEL Entry %x Command\n",
|
||||
rsp ? rsp->ccode : 0, *next_id);
|
||||
return NULL;
|
||||
}
|
||||
@ -250,9 +250,9 @@ ipmi_sel_print_std_entry(struct sel_event_record * evt)
|
||||
return;
|
||||
|
||||
if (csv_output)
|
||||
printf("%d,", evt->record_id);
|
||||
printf("%x,", evt->record_id);
|
||||
else
|
||||
printf("%4d | ", evt->record_id);
|
||||
printf("%4x | ", evt->record_id);
|
||||
|
||||
if (evt->timestamp < 0x20000000) {
|
||||
printf("Pre-Init Time-stamp");
|
||||
@ -330,7 +330,7 @@ ipmi_sel_list_entries(struct ipmi_intf * intf)
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (!rsp || rsp->ccode) {
|
||||
printf("Error%x in Get SEL Info command\n",
|
||||
printf("Error: %x from Get SEL Info command\n",
|
||||
rsp ? rsp->ccode : 0);
|
||||
return;
|
||||
}
|
||||
@ -348,7 +348,7 @@ ipmi_sel_list_entries(struct ipmi_intf * intf)
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (!rsp || rsp->ccode) {
|
||||
printf("Error:%x unable to reserve SEL\n",
|
||||
printf("Error: %x from Reserve SEL command\n",
|
||||
rsp ? rsp->ccode : 0);
|
||||
return;
|
||||
}
|
||||
@ -462,7 +462,8 @@ ipmi_sel_delete(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (!rsp || rsp->ccode)
|
||||
{
|
||||
printf("Error:%x unable to delete entry %d\n", rsp ? rsp->ccode : 0, id);
|
||||
if (!rsp) printf("No response\n");
|
||||
printf("Error %x unable to delete entry %d\n", rsp ? rsp->ccode : 0, id);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -232,7 +232,7 @@ ipmi_send_platform_event(struct ipmi_intf * intf, int num)
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("event to BMC\n");
|
||||
printf(" event to BMC\n");
|
||||
|
||||
req.msg.netfn = IPMI_NETFN_SE;
|
||||
req.msg.cmd = 0x02;
|
||||
@ -317,7 +317,7 @@ int main(int argc, char ** argv)
|
||||
intf->pedantic = pedantic;
|
||||
|
||||
if (!strncmp(argv[optind], "help", 4)) {
|
||||
printf("Commands: chassis, fru, lan, sdr, sel\n");
|
||||
printf("Commands: bmc, chaninfo, chassis, event, fru, lan, raw, sdr, sel, sensor, sol, userinfo\n");
|
||||
goto out_free;
|
||||
}
|
||||
else if (!strncmp(argv[optind], "event", 5)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user