mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 19:17:22 +00:00
add csv output support
This commit is contained in:
parent
fa3bb0960b
commit
718232945c
@ -177,7 +177,10 @@ __sdr_list_empty(struct sdr_record_list * head)
|
|||||||
static void
|
static void
|
||||||
led_print(const char * name, uint8_t state)
|
led_print(const char * name, uint8_t state)
|
||||||
{
|
{
|
||||||
printf("%-16s | %s\n", name, val2str(state, sunoem_led_mode_vals));
|
if (csv_output)
|
||||||
|
printf("%s,%s\n", name, val2str(state, sunoem_led_mode_vals));
|
||||||
|
else
|
||||||
|
printf("%-16s | %s\n", name, val2str(state, sunoem_led_mode_vals));
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ipmi_rs *
|
static struct ipmi_rs *
|
||||||
@ -399,7 +402,7 @@ ipmi_sunoem_led_get(struct ipmi_intf * intf, int argc, char ** argv)
|
|||||||
* handle logical entity for LED grouping
|
* handle logical entity for LED grouping
|
||||||
*/
|
*/
|
||||||
|
|
||||||
lprintf(LOG_NOTICE, "LED %s is logical device", argv[0]);
|
lprintf(LOG_INFO, "LED %s is logical device", argv[0]);
|
||||||
|
|
||||||
/* get entity assoc records */
|
/* get entity assoc records */
|
||||||
alist = ipmi_sdr_find_sdr_bytype(intf, SDR_RECORD_TYPE_ENTITY_ASSOC);
|
alist = ipmi_sdr_find_sdr_bytype(intf, SDR_RECORD_TYPE_ENTITY_ASSOC);
|
||||||
@ -553,7 +556,7 @@ ipmi_sunoem_led_set(struct ipmi_intf * intf, int argc, char ** argv)
|
|||||||
* handle logical entity for LED grouping
|
* handle logical entity for LED grouping
|
||||||
*/
|
*/
|
||||||
|
|
||||||
lprintf(LOG_NOTICE, "LED %s is logical device", argv[0]);
|
lprintf(LOG_INFO, "LED %s is logical device", argv[0]);
|
||||||
|
|
||||||
/* get entity assoc records */
|
/* get entity assoc records */
|
||||||
alist = ipmi_sdr_find_sdr_bytype(intf, SDR_RECORD_TYPE_ENTITY_ASSOC);
|
alist = ipmi_sdr_find_sdr_bytype(intf, SDR_RECORD_TYPE_ENTITY_ASSOC);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user