import CS ledmon-1.1.0-3.el9
This commit is contained in:
parent
9185b2e888
commit
c0d0b3fc5a
@ -0,0 +1,32 @@
|
||||
From 740a352626e2ed5d26389200f38323fde9bd84f1 Mon Sep 17 00:00:00 2001
|
||||
From: Blazej Kucman <blazej.kucman@intel.com>
|
||||
Date: Wed, 16 Apr 2025 12:26:38 +0200
|
||||
Subject: [PATCH] utils: Fix string2ibpi function
|
||||
|
||||
string2ibpi does not compare strings correctly, the function uses strncmp,
|
||||
which in case strings of different lengths, may return incorrect value
|
||||
if substrings of given max length are identical. In this function whole
|
||||
strings must be identical.
|
||||
|
||||
Fix is to change strncmp to strcmp.
|
||||
|
||||
Fixes intel/ledmon#259
|
||||
Fixes: 94818457f615 ("Add struct for mapping ibpi statuses to strings. (#211)")
|
||||
Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
|
||||
---
|
||||
src/lib/utils.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lib/utils.c b/src/lib/utils.c
|
||||
index bad35eb4..2fe0f764 100644
|
||||
--- a/src/lib/utils.c
|
||||
+++ b/src/lib/utils.c
|
||||
@@ -765,7 +765,7 @@ enum led_ibpi_pattern string2ibpi(const char *name)
|
||||
if (!input_name)
|
||||
continue;
|
||||
|
||||
- if (strncmp(input_name, name, strlen(input_name)) == 0)
|
||||
+ if (strcmp(input_name, name) == 0)
|
||||
return ipbi_names[i].ibpi;
|
||||
}
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
Summary: Enclosure LED Utilities
|
||||
Name: ledmon
|
||||
Version: 1.1.0
|
||||
Release: 1%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPLv2+
|
||||
URL: https://github.com/intel/ledmon
|
||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch: 0001-ledmon-1.1.0-utils-fix-string2ibpi-function.patch
|
||||
|
||||
BuildRequires: autoconf automake
|
||||
BuildRequires: autoconf-archive
|
||||
BuildRequires: gcc make
|
||||
@ -50,7 +52,7 @@ The %{name}-devel package contains libraries and header files for
|
||||
developing applications that use %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -p1
|
||||
autoreconf -fiv
|
||||
|
||||
%build
|
||||
@ -88,6 +90,12 @@ find %{buildroot} -name '*.la' -delete
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
|
||||
%changelog
|
||||
* Wed Jul 23 2025 Jan Macku <jamacku@redhat.com> - 1.1.0-3
|
||||
- Bump release (RHEL-95751)
|
||||
|
||||
* Mon Jun 09 2025 Jan Macku <jamacku@redhat.com> - 1.1.0-2
|
||||
- Fix string2ibpi function (RHEL-95751)
|
||||
|
||||
* Tue Nov 12 2024 Jan Macku <jamacku@redhat.com> - 1.1.0-1
|
||||
- update to 1.1.0
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user