summaryrefslogtreecommitdiffstats
path: root/perl-install/mouse.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>1999-11-16 15:54:57 +0000
committerFrancois Pons <fpons@mandriva.com>1999-11-16 15:54:57 +0000
commitc34d56dace9c34ca9986d75e462aa8395f546ece (patch)
treed1aee35e02d9ca3a7a8b3f86d8715856c705cb81 /perl-install/mouse.pm
parent68446bf48bc000cf485267ce0419d2d3f7caec5a (diff)
downloaddrakx-backup-do-not-use-c34d56dace9c34ca9986d75e462aa8395f546ece.tar
drakx-backup-do-not-use-c34d56dace9c34ca9986d75e462aa8395f546ece.tar.gz
drakx-backup-do-not-use-c34d56dace9c34ca9986d75e462aa8395f546ece.tar.bz2
drakx-backup-do-not-use-c34d56dace9c34ca9986d75e462aa8395f546ece.tar.xz
drakx-backup-do-not-use-c34d56dace9c34ca9986d75e462aa8395f546ece.zip
*** empty log message ***
Diffstat (limited to 'perl-install/mouse.pm')
-rw-r--r--perl-install/mouse.pm27
1 files changed, 25 insertions, 2 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 9dd539623..92d6683b5 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -86,13 +86,36 @@ sub write($;$) {
symlinkf $mouse->{device}, "$prefix/dev/mouse" or log::l("creating $prefix/dev/mouse symlink failed");
}
+sub mouseconfig {
+ my ($t, $mouse);
+
+ foreach (0..1) { #- probe only ttyS0 and ttyS1.
+ $t = detect_devices::probe_device(devices::make("/dev/ttyS$_"));
+ if ($t->{CLASS} =~ /MOUSE/i) {
+ $t->{MFG} ||= $t->{MANUFACTURER};
+
+ $mouse = name2mouse("Microsoft IntelliMouse (serial)") if $t->{MFG} eq 'MSH' && $t->{MODEL} eq '0001';
+ $mouse = name2mouse("Logitech MouseMan/FirstMouse (serial)") if $t->{MFG} eq 'LGI' && $t->{MODEL} =~ /^80/;
+ $mouse = name2mouse("Genius NetMouse (serial)") if $t->{MFG} eq 'KYE' && $t->{MODEL} eq '0003';
+
+ $mouse ||= name2mouse("Generic Mouse (serial)"); #- generic by default.
+ $mouse->{device} = "ttyS$_";
+ last;
+ }
+ }
+ $mouse;
+}
+
sub detect() {
detect_devices::hasMousePS2 and return name2mouse("Generic Mouse (PS/2)");
- my %l;
eval { commands::modprobe("serial") };
- @l{qw(FULLNAME nbuttons MOUSETYPE XMOUSETYPE device)} = split("\n", `mouseconfig --nointeractive 2>/dev/null`) and return \%l;
+ my $r; $r = mouseconfig(); return $r if $r;
modules::unload("serial");
+ #- my %l;
+ #- eval { commands::modprobe("serial") };
+ #- @l{qw(FULLNAME nbuttons MOUSETYPE XMOUSETYPE device)} = split("\n", `mouseconfig --nointeractive 2>/dev/null`) and return \%l;
+ #- modules::unload("serial");
if (my ($c) = pci_probing::main::probe("SERIAL_USB")) {
eval { modules::load($c->[1], 'usbmouse') };