summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 02dd6ef4f..251bf4fe4 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -544,6 +544,11 @@ sub getInputDevices_and_usb() {
@l;
}
+sub serialPorts() { map { "ttyS$_" } 0..7 }
+sub serialPort2text {
+ $_[0] =~ /ttyS(\d+)/ ? "$_[0] / COM" . ($1 + 1) : $_[0];
+}
+
sub getSerialModem {
my ($modules_conf, $o_mouse) = @_;
my $mouse = $o_mouse || {};
@@ -554,7 +559,7 @@ sub getSerialModem {
my @modems;
probeSerialDevices();
- foreach my $port (map { "ttyS$_" } (0..7)) {
+ foreach my $port (serialPorts()) {
next if $mouse->{device} =~ /$port/;
my $device = "/dev/$port";
next if !-e $device || !hasModem($device);