backport contrib: Fix corner case libipmimonitoring-sensors output
This commit is contained in:
parent
3f534a2abf
commit
86e201de22
@ -0,0 +1,44 @@
|
||||
From 0423bf4e64c89426584960d324f94921ed5336c3 Mon Sep 17 00:00:00 2001
|
||||
From: Albert Chu <chu11@llnl.gov>
|
||||
Date: Wed, 12 Dec 2018 13:44:46 -0800
|
||||
Subject: [PATCH] contrib: Fix corner case libipmimonitoring-sensors output
|
||||
|
||||
---
|
||||
contrib/libipmimonitoring/ipmimonitoring-sensors.c | 14 ++++++--------
|
||||
1 file changed, 6 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/contrib/libipmimonitoring/ipmimonitoring-sensors.c b/contrib/libipmimonitoring/ipmimonitoring-sensors.c
|
||||
index 55001debc..7cf5db58b 100644
|
||||
--- a/contrib/libipmimonitoring/ipmimonitoring-sensors.c
|
||||
+++ b/contrib/libipmimonitoring/ipmimonitoring-sensors.c
|
||||
@@ -441,13 +441,10 @@ _ipmimonitoring (struct ipmi_monitoring_ipmi_config *ipmi_config)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
- if (!(sensor_bitmask_strings = ipmi_monitoring_sensor_read_sensor_bitmask_strings (ctx)))
|
||||
- {
|
||||
- fprintf (stderr,
|
||||
- "ipmi_monitoring_sensor_read_sensor_bitmask_strings: %s\n",
|
||||
- ipmi_monitoring_ctx_errormsg (ctx));
|
||||
- goto cleanup;
|
||||
- }
|
||||
+ /* it's ok for this to be NULL, i.e. sensor_bitmask ==
|
||||
+ * IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN
|
||||
+ */
|
||||
+ sensor_bitmask_strings = ipmi_monitoring_sensor_read_sensor_bitmask_strings (ctx);
|
||||
|
||||
if ((sensor_reading_type = ipmi_monitoring_sensor_read_sensor_reading_type (ctx)) < 0)
|
||||
{
|
||||
@@ -541,7 +538,8 @@ _ipmimonitoring (struct ipmi_monitoring_ipmi_config *ipmi_config)
|
||||
else
|
||||
printf (", N/A");
|
||||
|
||||
- if (sensor_bitmask_type != IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN)
|
||||
+ if (sensor_bitmask_type != IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN
|
||||
+ && sensor_bitmask_strings)
|
||||
{
|
||||
unsigned int i = 0;
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: freeipmi
|
||||
Version: 1.6.2
|
||||
Release: 6
|
||||
Release: 7
|
||||
Summary: IPMI remote console and system management software
|
||||
License: GPLv3+
|
||||
URL: http://www.gnu.org/software/freeipmi/
|
||||
@ -10,6 +10,7 @@ Source2: ipmidetectd.service
|
||||
Source3: ipmiseld.service
|
||||
|
||||
Patch0001: 0001-Fix-manpage-SDR-English-typo.patch
|
||||
Patch0002: 0002-contrib-Fix-corner-case-libipmimonitoring-sensors-ou.patch
|
||||
|
||||
BuildRequires: libgcrypt-devel texinfo systemd
|
||||
%{?systemd_requires}
|
||||
@ -139,6 +140,9 @@ install-info %{_infodir}/freeipmi-faq.info.gz %{_infodir}/dir &>/dev/null || :
|
||||
%exclude %{_infodir}/dir
|
||||
|
||||
%changelog
|
||||
* Thu Dec 28 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1.6.2-7
|
||||
- contrib: Fix corner case libipmimonitoring-sensors output
|
||||
|
||||
* Fri Dec 22 2023 liyuanyuan <liyuanyuan@xfusion.com> - 1.6.2-6
|
||||
- Fix manpage SDR English typo
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user