rhbz#806364 - sensors-detect fails with "/sys/bus/pci/devices: No such file or directory"
PCI bus is always required even if it might be missing on some platforms. So don't choke is it is missing. Patch from Jaromir Capik Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
This commit is contained in:
parent
a15e1ccac4
commit
373ef7f250
@ -0,0 +1,44 @@
|
|||||||
|
From 9c4da0d42de91406a75c802099451b5dba03bd1f Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <9c4da0d42de91406a75c802099451b5dba03bd1f.1333368985.git.npajkovs@redhat.com>
|
||||||
|
From: khali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>
|
||||||
|
Date: Thu, 29 Mar 2012 06:33:15 +0000
|
||||||
|
Subject: [PATCH] PCI bus is always required even if it might be missing on
|
||||||
|
some platforms. So don't choke is it is missing. Patch from
|
||||||
|
Jaromir Capik.
|
||||||
|
|
||||||
|
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@6038 7894878c-1315-0410-8ee3-d5d059ff63e0
|
||||||
|
---
|
||||||
|
CHANGES | 3 +++
|
||||||
|
prog/detect/sensors-detect | 2 +-
|
||||||
|
2 files changed, 4 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CHANGES b/CHANGES
|
||||||
|
index 167cd15..5b57d72 100644
|
||||||
|
--- a/CHANGES
|
||||||
|
+++ b/CHANGES
|
||||||
|
@@ -1,6 +1,9 @@
|
||||||
|
lm-sensors CHANGES file
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
+SVN HEAD
|
||||||
|
+ sensors-detect: Don't choke on systems without PCI
|
||||||
|
+
|
||||||
|
3.3.2 (2012-03-14)
|
||||||
|
libsensors: Added support for new sysfs attributes
|
||||||
|
Change sysfs detection to survive upcoming kernel changes
|
||||||
|
diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect
|
||||||
|
index 709f546..970e26f 100755
|
||||||
|
--- a/prog/detect/sensors-detect
|
||||||
|
+++ b/prog/detect/sensors-detect
|
||||||
|
@@ -2996,7 +2996,7 @@ sub read_sys_dev_pci
|
||||||
|
my ($dev, @pci_list);
|
||||||
|
|
||||||
|
opendir(local *DEVICES, "$devices")
|
||||||
|
- or die "$devices: $!";
|
||||||
|
+ or return \@pci_list;
|
||||||
|
|
||||||
|
while (defined($dev = readdir(DEVICES))) {
|
||||||
|
my %record;
|
||||||
|
--
|
||||||
|
1.7.7.2
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: lm_sensors
|
Name: lm_sensors
|
||||||
Version: 3.3.2
|
Version: 3.3.2
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
URL: http://www.lm-sensors.org/
|
URL: http://www.lm-sensors.org/
|
||||||
Source: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2
|
Source: http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2
|
||||||
Source1: lm_sensors.sysconfig
|
Source1: lm_sensors.sysconfig
|
||||||
@ -16,6 +16,8 @@ Requires: /usr/sbin/dmidecode
|
|||||||
Requires(post): systemd-units
|
Requires(post): systemd-units
|
||||||
BuildRequires: kernel-headers >= 2.2.16, bison, libsysfs-devel, flex, gawk
|
BuildRequires: kernel-headers >= 2.2.16, bison, libsysfs-devel, flex, gawk
|
||||||
BuildRequires: rrdtool-devel
|
BuildRequires: rrdtool-devel
|
||||||
|
Patch0: 0001-PCI-bus-is-always-required-even-if-it-might-be-missi.patch
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The lm_sensors package includes a collection of modules for general SMBus
|
The lm_sensors package includes a collection of modules for general SMBus
|
||||||
@ -52,6 +54,7 @@ database, and warns of sensor alarms.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
mv prog/init/README prog/init/README.initscripts
|
mv prog/init/README prog/init/README.initscripts
|
||||||
chmod -x prog/init/fancontrol.init
|
chmod -x prog/init/fancontrol.init
|
||||||
@ -155,6 +158,12 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 02 2012 Nikola Pajkovsky <npajkovs@redhat.com> - 3.3.2-2
|
||||||
|
- rhbz#806364 - sensors-detect fails with "/sys/bus/pci/devices: No such file or directory at /usr/sbin/sensors-detect line 2895"
|
||||||
|
PCI bus is always required even if it might be missing on
|
||||||
|
some platforms. So don't choke is it is missing. Patch from
|
||||||
|
Jaromir Capik
|
||||||
|
|
||||||
* Thu Mar 15 2012 Nikola Pajkovsky <npajkovs@redhat.com> - 3.3.2-1
|
* Thu Mar 15 2012 Nikola Pajkovsky <npajkovs@redhat.com> - 3.3.2-1
|
||||||
- upstream lm-sensors-3.3.2
|
- upstream lm-sensors-3.3.2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user