import CS lshw-B.02.20-4.el9

This commit is contained in:
AlmaLinux RelEng Bot 2026-03-30 10:43:54 -04:00
parent 577b6812d6
commit 667553a4dc
5 changed files with 205 additions and 1 deletions

View File

@ -0,0 +1,77 @@
From 209f8306e9500cf5ac32f01abb11ff6dcce76b0a Mon Sep 17 00:00:00 2001
From: Lyonel Vincent <lyonel@ezix.org>
Date: Mon, 3 Nov 2025 14:18:42 +0100
Subject: [PATCH] Add accelerator hardware class
merge Github PR#107
---
src/core/hw.cc | 3 +++
src/core/hw.h | 3 ++-
src/core/pci.cc | 9 +++++++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/core/hw.cc b/src/core/hw.cc
index 1c1dad4..f198a25 100644
--- a/src/core/hw.cc
+++ b/src/core/hw.cc
@@ -231,6 +231,9 @@ const char *hwNode::getClassName() const
case volume:
return "volume";
+ case accelerator:
+ return "accelerator";
+
default:
return "generic";
}
diff --git a/src/core/hw.h b/src/core/hw.h
index 451e9b3..f4f9272 100644
--- a/src/core/hw.h
+++ b/src/core/hw.h
@@ -28,7 +28,8 @@ namespace hw
communication,
power,
volume,
- generic
+ generic,
+ accelerator
} hwClass;
typedef enum { none, iomem, ioport, mem, irq, dma }
diff --git a/src/core/pci.cc b/src/core/pci.cc
index 009f844..08f2263 100644
--- a/src/core/pci.cc
+++ b/src/core/pci.cc
@@ -179,6 +179,9 @@ __ID("@(#) $Id$");
#define PCI_CLASS_SERIAL_USB 0x0c03
#define PCI_CLASS_SERIAL_FIBER 0x0c04
+#define PCI_BASE_CLASS_ACCELERATOR 0x12
+#define PCI_CLASS_ACCELERATOR 0x1200
+
#define PCI_CLASS_OTHERS 0xff
#define PCI_ADDR_MEM_MASK (~(pciaddr_t) 0xf)
@@ -393,6 +396,8 @@ static const char *get_class_name(unsigned int c)
return "processor";
case PCI_BASE_CLASS_SERIAL:
return "serial";
+ case PCI_BASE_CLASS_ACCELERATOR:
+ return "accelerator";
}
return "generic";
@@ -907,6 +912,10 @@ static hwNode *scan_pci_dev(struct pci_dev &d, hwNode & n)
case PCI_BASE_CLASS_INPUT:
deviceclass = hw::input;
break;
+ case PCI_BASE_CLASS_ACCELERATOR:
+ deviceclass = hw::accelerator;
+ deviceicon = "accelerator";
+ break;
case PCI_BASE_CLASS_PROCESSOR:
deviceclass = hw::processor;
break;
--
2.47.0

View File

@ -0,0 +1,35 @@
From c17d8837aa2387207c353529c0910d9cfbc81bb1 Mon Sep 17 00:00:00 2001
From: Lyonel Vincent <lyonel@ezix.org>
Date: Mon, 28 Jul 2025 22:27:57 +0200
Subject: [PATCH 1/3] fix not closing fd during framebuffer detection
patch from Rafi Wiener (github PR#106)
---
src/core/fb.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/core/fb.cc b/src/core/fb.cc
index d198982..465c899 100644
--- a/src/core/fb.cc
+++ b/src/core/fb.cc
@@ -233,6 +233,7 @@ bool scan_fb(hwNode & n)
if (fd[i] >= 0)
{
+ fbdevs++;
hwNode *fbdev = NULL;
struct fb_fix_screeninfo fbi;
@@ -335,7 +336,8 @@ bool scan_fb(hwNode & n)
for (unsigned int j = 0; j < fbdevs; j++)
{
- close(fd[j]);
+ if (fd[j] >= 0)
+ close(fd[j]);
}
return false;
--
2.47.0

View File

@ -0,0 +1,56 @@
From 8798c9f1a2f62b02188be155badacffb229c69a6 Mon Sep 17 00:00:00 2001
From: Lyonel Vincent <lyonel@ezix.org>
Date: Mon, 28 Jul 2025 23:16:15 +0200
Subject: [PATCH 2/3] improve fb detection
based on github PR#106
---
src/core/fb.cc | 7 +++++++
src/core/sysfs.cc | 1 +
2 files changed, 8 insertions(+)
diff --git a/src/core/fb.cc b/src/core/fb.cc
index 465c899..85c2d17 100644
--- a/src/core/fb.cc
+++ b/src/core/fb.cc
@@ -6,6 +6,8 @@
#include "version.h"
#include "fb.h"
+#include "sysfs.h"
+#include "osutils.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
@@ -239,11 +241,16 @@ bool scan_fb(hwNode & n)
if (ioctl(fd[i], FBIOGET_FSCREENINFO, &fbi) == 0)
{
+ fbdev = n.findChildByBusInfo(sysfs::entry::byClass("graphics", "fb"+tostring(i)).businfo());
+
+ if(!fbdev)
+ {
fbdev =
n.
findChildByResource(hw::resource::
iomem((unsigned long) fbi.smem_start,
fbi.smem_len));
+ }
if (fbdev)
{
diff --git a/src/core/sysfs.cc b/src/core/sysfs.cc
index fda1e9b..f7296a3 100644
--- a/src/core/sysfs.cc
+++ b/src/core/sysfs.cc
@@ -189,6 +189,7 @@ static string sysfstobusinfo(const string & path)
string entry::businfo() const
{
+ if(!This) return "";
string result = sysfstobusinfo(This->devpath);
if (result.empty())
result = sysfstobusinfo(dirname(This->devpath));
--
2.47.0

View File

@ -0,0 +1,26 @@
From af7c69e1b6e9bfc81aef1c167f18d1515f413963 Mon Sep 17 00:00:00 2001
From: Lyonel Vincent <lyonel@ezix.org>
Date: Tue, 9 Sep 2025 23:30:06 +0200
Subject: [PATCH 3/3] another try at fixing the Github fbdev issue
cf. previous commit
---
src/core/fb.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/fb.cc b/src/core/fb.cc
index 85c2d17..d32434c 100644
--- a/src/core/fb.cc
+++ b/src/core/fb.cc
@@ -241,7 +241,7 @@ bool scan_fb(hwNode & n)
if (ioctl(fd[i], FBIOGET_FSCREENINFO, &fbi) == 0)
{
- fbdev = n.findChildByBusInfo(sysfs::entry::byClass("graphics", "fb"+tostring(i)).businfo());
+ fbdev = n.findChildByBusInfo(sysfs::entry::byClass("graphics", "fb"+tostring(i)+"/device").businfo());
if(!fbdev)
{
--
2.47.0

View File

@ -2,7 +2,7 @@
Summary: Hardware lister
Name: lshw
Version: B.02.20
Release: 2%{?dist}
Release: 4%{?dist}
License: GPLv2
URL: http://ezix.org/project/wiki/HardwareLiSter
Source0: http://www.ezix.org/software/files/lshw-%{version}.tar.gz
@ -15,6 +15,10 @@ Patch11: 0003-update-changelog.patch
Patch12: 0004-escape-in-JSON-output.patch
Patch13: 0005-merge-Github-PR-101.patch
Patch14: 0001-merge-Github-PR-103.patch
Patch15: 0001-fix-not-closing-fd-during-framebuffer-detection.patch
Patch16: 0002-improve-fb-detection.patch
Patch17: 0003-another-try-at-fixing-the-Github-fbdev-issue.patch
Patch18: 0001-Add-accelerator-hardware-class.patch
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: gcc
@ -94,6 +98,12 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata
%{_datadir}/polkit-1/actions/org.ezix.lshw.gui.policy
%changelog
* Mon Nov 24 2025 Tao Liu <ltao@redhat.com> - B.02.20-4
- Release B.02.20-4 update to upstream latest(209f8306e95)
* Wed Oct 22 2025 Tao Liu <ltao@redhat.com> - B.02.20-3
- Release B.02.20-3 update to upstream latest(af7c69e1b6e)
* Mon May 5 2025 Tao Liu <ltao@redhat.com> - B.02.20-2
- Release B.02.20-2 update to upstream latest(98b74f64e76)