mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-31 14:25:39 +00:00
Don't choke on virtual i2c adapters.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5785 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -2199,7 +2199,10 @@ sub initialize_i2c_adapters_list
|
||||
# The layout in sysfs has changed over the years
|
||||
if ($have_i2c_adapter_class) {
|
||||
my $link = readlink("${base_dir}/i2c-$nr/device");
|
||||
if ($link =~ m/^(.*)\/i2c-$nr$/) {
|
||||
if (!defined $link) {
|
||||
$entry->{path} = "${base_dir}/i2c-$nr";
|
||||
$entry->{parent} = "${base_dir}/i2c-$nr";
|
||||
} elsif ($link =~ m/^(.*)\/i2c-$nr$/) {
|
||||
$entry->{path} = "${base_dir}/i2c-$nr/device";
|
||||
$entry->{parent} = "${base_dir}/i2c-$nr/$1";
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user