lm_sensors/0001-PCI-bus-is-always-required-even-if-it-might-be-missi.patch
Nikola Pajkovsky 373ef7f250 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>
2012-04-02 15:14:15 +02:00

45 lines
1.4 KiB
Diff

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