summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-09-22 10:06:02 +0000
committerOlivier Blin <oblin@mandriva.com>2007-09-22 10:06:02 +0000
commit7d89964d2b342f8911ad58fd3950ea29ec9abaf1 (patch)
treed328f86d85b6686dc2d6c2aa26c2aa6ac6f1b5d8 /perl-install
parent6c6b0c04958b2528e4902d7588da0067eeeed6a8 (diff)
downloaddrakx-7d89964d2b342f8911ad58fd3950ea29ec9abaf1.tar
drakx-7d89964d2b342f8911ad58fd3950ea29ec9abaf1.tar.gz
drakx-7d89964d2b342f8911ad58fd3950ea29ec9abaf1.tar.bz2
drakx-7d89964d2b342f8911ad58fd3950ea29ec9abaf1.tar.xz
drakx-7d89964d2b342f8911ad58fd3950ea29ec9abaf1.zip
add probeall_dkms_modules() to list modules that are available in dkms packages
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index b1e9fc907..4b77ddfac 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -1143,6 +1143,24 @@ sub hasMousePS2 {
my $t; sysread(tryOpen($_[0]) || return, $t, 256) != 1 || $t ne "\xFE";
}
+sub probeall_unavailable_modules {
+ map {
+ my $driver = $_->{driver};
+ $driver !~ /:/ &&
+ !member($driver, 'hub', 'unknown', 'md64_agp') &&
+ !modules::module_is_available($driver) ?
+ $driver :
+ ();
+ } probeall();
+}
+
+sub probeall_dkms_modules {
+ my @unavailable_modules = probeall_unavailable_modules() or return;
+ require modalias;
+ my $dkms_modules = modalias::parse_file_modules($::prefix . "/usr/share/ldetect-lst/dkms-modules.alias");
+ intersection([ keys(%$dkms_modules) ], \@unavailable_modules);
+}
+
sub usb_description2removable {
local ($_) = @_;
return 'camera' if /\bcamera\b/i;