From 51ba86c170afb8f17897fe1cbcd108f07b432e79 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 22 Feb 2008 11:55:54 +0000 Subject: find conflicting drivers attached on the ssb bus (for example b43) --- lib/network/ndiswrapper.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/network/ndiswrapper.pm') 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; } -- cgit v1.2.1