summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-09-10 14:07:51 +0000
committerFrancois Pons <fpons@mandriva.com>2003-09-10 14:07:51 +0000
commitacc835793ff7e47eb5e253714ae074369cd3ba17 (patch)
tree8ce19a7d4c27861be10d5fa65651827a4cf9c1cc
parent805f7a55d5adfc4cc3d7fd40d1e18f5936b70db7 (diff)
downloaddrakx-backup-do-not-use-acc835793ff7e47eb5e253714ae074369cd3ba17.tar
drakx-backup-do-not-use-acc835793ff7e47eb5e253714ae074369cd3ba17.tar.gz
drakx-backup-do-not-use-acc835793ff7e47eb5e253714ae074369cd3ba17.tar.bz2
drakx-backup-do-not-use-acc835793ff7e47eb5e253714ae074369cd3ba17.tar.xz
drakx-backup-do-not-use-acc835793ff7e47eb5e253714ae074369cd3ba17.zip
added load_modules to load mouse module according to configuration.
-rw-r--r--perl-install/mouse.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 70d891141..3de4cb781 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -268,6 +268,7 @@ sub detect() {
}
if (modules::get_probeall("usb-interface")) {
+ sleep 2;
if (my (@l) = detect_devices::usbMice()) {
log::l(join('', "found usb mouse $_->{driver} $_->{description} (", if_($_->{type}, $_->{type}), ")")) foreach @l;
eval { modules::load(qw(hid mousedev usbmouse)) };
@@ -325,6 +326,20 @@ sub detect() {
return fullname2mouse("serial|Generic 2 Button Mouse", unsafe => 1);
}
+sub load_modules {
+ my ($mouse) = @_;
+ my @l;
+ for ($mouse->{type}) {
+ /serial/ and @l = qw(serial);
+ /USB/ and @l = qw(hid mousedev usbmouse);
+ }
+ foreach ($mouse->{wacom}) {
+ /ttyS/ and push @l, qw(serial);
+ /event/ and push @l, qw(wacom evdev);
+ }
+ eval { modules::load(@l) };
+}
+
sub set_xfree_conf {
my ($mouse, $xfree_conf, $b_keep_auxmouse_unchanged) = @_;