2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 06:15:15 +00:00

Fixed previous sensors-detect correction :-(

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@775 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard
2000-03-15 00:26:50 +00:00
parent 42dafe1a5f
commit 60851c96e3

View File

@@ -651,13 +651,16 @@ sub read_proc_pci
open INPUTFILE, "/proc/pci" or return;
while (<INPUTFILE>) {
my $record = {};
if (($record->{bus}+0,$record->{slot}+0,$record->{func}+0) =
if (($record->{bus},$record->{slot},$record->{func}) =
/^\s*Bus\s*(\S)+\s*,\s*device\s*(\S+)\s*,\s*function\s*(\S+)\s*:\s*$/) {
my $desc = <INPUTFILE>;
$_ = <INPUTFILE>;
unless (($desc =~ /Unknown device/) and
if (($desc =~ /Unknown device/) and
(($record->{vendid},$record->{devid}) =
/^\s*Vendor id=(\S+)\.\s*Device id=(\S+)\.$/)) {
$record->{vendid} = hex $record->{vendid};
$record->{devid} = hex $record->{devid};
} else {
$record->{desc} = $desc;
}
push @pci_list,$record;