mirror of
https://github.com/ipmitool/ipmitool.git
synced 2026-06-28 16:21:35 +00:00
Small fix for SDR csv output.
This patch separates the sensor reading and it's unit (Volts, RPM etc.) into two columns. This simplifies feeding the readings into other utilities that expect pure numeric input. From Fredrik Öhrn
This commit is contained in:
@@ -476,8 +476,14 @@ ipmi_sdr_print_sensors(struct ipmi_intf * intf, int do_unit)
|
||||
}
|
||||
printf("%s", sval);
|
||||
|
||||
if (do_unit && validread)
|
||||
printf(" %s", unitstr);
|
||||
if (validread) {
|
||||
if (csv_output)
|
||||
printf(",");
|
||||
else
|
||||
printf(" ");
|
||||
if (do_unit)
|
||||
printf("%s", unitstr);
|
||||
}
|
||||
|
||||
if (csv_output)
|
||||
printf(",");
|
||||
|
||||
Reference in New Issue
Block a user