diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-02-22 11:55:54 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-02-22 11:55:54 +0000 |
commit | 51ba86c170afb8f17897fe1cbcd108f07b432e79 (patch) | |
tree | 2c73fe20bdd0f2592b66f6460ac8d7359f8c0ce2 | |
parent | 839f8d4645badb3e01234505cb9965c7652ca611 (diff) | |
download | drakx-net-51ba86c170afb8f17897fe1cbcd108f07b432e79.tar drakx-net-51ba86c170afb8f17897fe1cbcd108f07b432e79.tar.gz drakx-net-51ba86c170afb8f17897fe1cbcd108f07b432e79.tar.bz2 drakx-net-51ba86c170afb8f17897fe1cbcd108f07b432e79.tar.xz drakx-net-51ba86c170afb8f17897fe1cbcd108f07b432e79.zip |
find conflicting drivers attached on the ssb bus (for example b43)
-rw-r--r-- | lib/network/ndiswrapper.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/network/ndiswrapper.pm b/lib/network/ndiswrapper.pm index 6950c2b..bd81bc3 100644 --- a/lib/network/ndiswrapper.pm +++ b/lib/network/ndiswrapper.pm @@ -5,6 +5,9 @@ use common; use modules; use detect_devices; +#- using bsd_glob() since glob("/DONT_EXIST") return "/DONT_EXIST" instead of () (and we don't want this) +use File::Glob ':glob'; + my $ndiswrapper_root = "/etc/ndiswrapper"; sub installed_drivers() { @@ -67,6 +70,9 @@ sub find_matching_devices { my $sysfs_driver = $device->{sysfs_device} && basename(readlink($device->{sysfs_device} . "/driver/module")); if ($sysfs_driver) { my @sysfs_drivers = $sysfs_driver; + if ($sysfs_drivers[0] eq 'ssb') { + push @sysfs_drivers, map { basename(readlink($_)) } bsd_glob($device->{sysfs_device} . "/ssb*/driver/module"); + } @sysfs_drivers = grep { !$is_driver_listed->($_) } @sysfs_drivers; push @devices, { interface => undef, drivers => \@sysfs_drivers } if @sysfs_drivers; } |