From 3401c296c098633573ae9dfb0a4138f99e0e1cc4 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 26 Aug 2002 12:52:17 +0000 Subject: avoid using serial_probe on non terminal device (ttyxx or ttySxx). --- perl-install/detect_devices.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'perl-install/detect_devices.pm') diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 634b4fe6c..43d3b785d 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -599,8 +599,12 @@ sub whatPrinterPort() { } sub probeSerialDevices { - #- make sure the device are created before probing. - foreach (0..3) { devices::make("/dev/ttyS$_") } + foreach (0..3) { + #- make sure the device are created before probing, + devices::make("/dev/ttyS$_"); + #- and make sure the device is a real terminal (major is 4). + int((stat "/dev/ttyS$_")[6]/256) == 4 or $serialprobe{"/dev/ttyS$_"} = undef; + } #- for device already probed, we can safely (assuming device are #- not moved during install :-) -- cgit v1.2.1