2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2024-11-21 17:11:45 +00:00
xcat-dep/ipmitool/0011-expand-sensor-name-column.patch
2022-09-26 15:15:09 +02:00

58 lines
1.7 KiB
Diff

From 57b57b27fe2c17e3030c41ee5566af36ccd33941 Mon Sep 17 00:00:00 2001
From: Vaclav Dolezal <vdolezal@redhat.com>
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