summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-07-01 15:56:07 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-07-01 15:56:07 +0000
commit543837c945ad7ded0062e32653b895a968c9258e (patch)
treed2a9b5f7e45729cb012c533b6c6bcffd010c4ff5
parent5b1dde25e39460587b71ddb165475bea50781c31 (diff)
downloaddrakx-kbd-mouse-x11-543837c945ad7ded0062e32653b895a968c9258e.tar
drakx-kbd-mouse-x11-543837c945ad7ded0062e32653b895a968c9258e.tar.gz
drakx-kbd-mouse-x11-543837c945ad7ded0062e32653b895a968c9258e.tar.bz2
drakx-kbd-mouse-x11-543837c945ad7ded0062e32653b895a968c9258e.tar.xz
drakx-kbd-mouse-x11-543837c945ad7ded0062e32653b895a968c9258e.zip
move serial_ports to detect_devices.pm
-rw-r--r--lib/mouse.pm7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/mouse.pm b/lib/mouse.pm
index 9c5d50d..8139618 100644
--- a/lib/mouse.pm
+++ b/lib/mouse.pm
@@ -209,11 +209,6 @@ sub fullname2mouse {
die "$fname not found ($type, $name)";
}
-sub serial_ports() { map { "ttyS$_" } 0..7 }
-sub serial_port2text {
- $_[0] =~ /ttyS(\d+)/ ? "$_[0] / COM" . ($1 + 1) : $_[0];
-}
-
sub read() {
my %mouse = getVarsFromSh "$::prefix/etc/sysconfig/mouse";
eval { fullname2mouse($mouse{FULLNAME}, device => $mouse{device}) } || \%mouse;
@@ -553,7 +548,7 @@ sub select {
$in->ask_from_({ title => N("Mouse Port"),
messages => N("Please choose which serial port your mouse is connected to."),
interactive_help_id => 'selectSerialPort',
- }, [ { list => [ serial_ports() ], format => \&serial_port2text, val => \$mouse->{device} } ]) or return &select;
+ }, [ { list => [ detect_devices::serialPorts() ], format => \&detect_devices::serialPort2text, val => \$mouse->{device} } ]) or return &select;
}
if (arch() =~ /ppc/ && $mouse->{nbuttons} == 1) {