diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-01-01 17:09:26 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-01-01 17:09:26 +0000 |
commit | d004436dc848800c9d65b90e39c39836c4d44cdf (patch) | |
tree | b37bdcac9dad762a2b692076522785a83533c5f6 /perl-install/mouse.pm | |
parent | 1dc94110fc837dbe6cf06806f60c207ab1b64e83 (diff) | |
download | drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.tar drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.tar.gz drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.tar.bz2 drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.tar.xz drakx-d004436dc848800c9d65b90e39c39836c4d44cdf.zip |
no_comment
Diffstat (limited to 'perl-install/mouse.pm')
-rw-r--r-- | perl-install/mouse.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index 056f3749f..4ab9c9a32 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -87,7 +87,7 @@ sub write($;$) { } sub mouseconfig { - my ($t, $mouse); + my ($t, $mouse, $wacom); foreach (0..1) { #- probe only ttyS0 and ttyS1. $t = detect_devices::probe_device("/dev/ttyS$_"); @@ -101,16 +101,18 @@ sub mouseconfig { $mouse ||= name2mouse("Generic Mouse (serial)"); #- generic by default. $mouse->{device} = "ttyS$_"; last; + } elsif ($t->{CLASS} eq "PEN" || $t->{MANUFACTURER} eq "WAC") { + $wacom = "ttyS$_"; } } - $mouse; + $mouse, $wacom; } sub detect() { detect_devices::hasMousePS2 and return name2mouse("Generic Mouse (PS/2)"); eval { commands::modprobe("serial") }; - my $r; $r = mouseconfig(); return $r if $r; + my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r; #- my %l; #- eval { commands::modprobe("serial") }; #- @l{qw(FULLNAME nbuttons MOUSETYPE XMOUSETYPE device)} = split("\n", `mouseconfig --nointeractive 2>/dev/null`) and return \%l; @@ -120,7 +122,7 @@ sub detect() { if (my ($c) = pci_probing::main::probe("serial_usb")) { eval { modules::load($c->[1], "serial_usb") }; sleep(1); - do { modules::unload("serial"); return name2mouse("USB Mouse") } if !$@ && detect_devices::tryOpen("usbmouse"); + do { $wacom or modules::unload("serial"); return name2mouse("USB Mouse"), $wacom } if !$@ && detect_devices::tryOpen("usbmouse"); modules::unload($c->[1]); } die "mouseconfig failed"; |