mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-03 15:55:15 +00:00
Reindent pci access functions.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5446 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -2395,7 +2395,7 @@ use vars qw(%pci_list);
|
||||
# 'domain', 'bus', 'slot' and 'func' uniquely identify a PCI device in a
|
||||
# computer; 'vendid' and 'devid' uniquely identify a type of device.
|
||||
# 'class' lets us spot unknown SMBus adapters.
|
||||
sub read_sys_dev_pci($)
|
||||
sub read_sys_dev_pci
|
||||
{
|
||||
my $devices = shift;
|
||||
my ($dev, @pci_list);
|
||||
@@ -2413,10 +2413,12 @@ sub read_sys_dev_pci($)
|
||||
$record{slot} = hex $3;
|
||||
$record{func} = hex $4;
|
||||
|
||||
$record{vendid} = oct sysfs_device_attribute("$devices/$dev", "vendor");
|
||||
$record{devid} = oct sysfs_device_attribute("$devices/$dev", "device");
|
||||
$record{class} = (oct sysfs_device_attribute("$devices/$dev", "class"))
|
||||
>> 8;
|
||||
$record{vendid} = oct sysfs_device_attribute("$devices/$dev",
|
||||
"vendor");
|
||||
$record{devid} = oct sysfs_device_attribute("$devices/$dev",
|
||||
"device");
|
||||
$record{class} = (oct sysfs_device_attribute("$devices/$dev",
|
||||
"class")) >> 8;
|
||||
|
||||
push @pci_list, \%record;
|
||||
}
|
||||
@@ -2427,6 +2429,7 @@ sub read_sys_dev_pci($)
|
||||
sub initialize_pci
|
||||
{
|
||||
my $pci_list;
|
||||
local $_;
|
||||
|
||||
$pci_list = read_sys_dev_pci("$sysfs_root/bus/pci/devices");
|
||||
|
||||
|
Reference in New Issue
Block a user