From 07f2978a529a89a9de92a2ff0e00d98877c1e2ef Mon Sep 17 00:00:00 2001 From: Vaclav Dolezal Date: Mon, 3 Feb 2020 12:53:45 +0100 Subject: [PATCH] Expanded column for sensor name in 'ipmi sdr/sensor' We have patch that allows for longer sensor names so expand respective column in output so columns are aligned. --- 0011-expand-sensor-name-column.patch | 57 ++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 0011-expand-sensor-name-column.patch diff --git a/0011-expand-sensor-name-column.patch b/0011-expand-sensor-name-column.patch new file mode 100644 index 0000000..85e0c92 --- /dev/null +++ b/0011-expand-sensor-name-column.patch @@ -0,0 +1,57 @@ +From 57b57b27fe2c17e3030c41ee5566af36ccd33941 Mon Sep 17 00:00:00 2001 +From: Vaclav Dolezal +Date: Thu, 30 Jan 2020 16:18:37 +0100 +Subject: [PATCH] Expand column with name in ipmitool sdr/sensor output + +--- + lib/ipmi_sdr.c | 4 ++-- + lib/ipmi_sensor.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/lib/ipmi_sdr.c b/lib/ipmi_sdr.c +index fd2c02d..0f6faab 100644 +--- a/lib/ipmi_sdr.c ++++ b/lib/ipmi_sdr.c +@@ -1619,7 +1619,7 @@ ipmi_sdr_print_sensor_fc(struct ipmi_intf *intf, + /* + * print sensor name, reading, state + */ +- printf("%-16s | ", sr->s_id); ++ printf("%-24s | ", sr->s_id); + + memset(sval, 0, sizeof (sval)); + +@@ -1657,7 +1657,7 @@ ipmi_sdr_print_sensor_fc(struct ipmi_intf *intf, + /* + * print sensor name, number, state, entity, reading + */ +- printf("%-16s | %02Xh | ", ++ printf("%-24s | %02Xh | ", + sr->s_id, sensor->keys.sensor_num); + + if (IS_THRESHOLD_SENSOR(sensor)) { +diff --git a/lib/ipmi_sensor.c b/lib/ipmi_sensor.c +index a0b7eb8..7328508 100644 +--- a/lib/ipmi_sensor.c ++++ b/lib/ipmi_sensor.c +@@ -175,7 +175,7 @@ ipmi_sensor_print_fc_discrete(struct ipmi_intf *intf, + /* output format + * id value units status thresholds.... + */ +- printf("%-16s ", sr->s_id); ++ printf("%-24s ", sr->s_id); + if (sr->s_reading_valid) { + if (sr->s_has_analog_value) { + /* don't show discrete component */ +@@ -276,7 +276,7 @@ ipmi_sensor_print_fc_threshold(struct ipmi_intf *intf, + /* output format + * id value units status thresholds.... + */ +- printf("%-16s ", sr->s_id); ++ printf("%-24s ", sr->s_id); + if (sr->s_reading_valid) { + if (sr->s_has_analog_value) + printf("| %-10.3f | %-10s | %-6s", +-- +2.20.1 +