From db45b048efabc698b35fd703da71b5c12dd58235 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Tue, 12 Feb 2002 19:42:52 +0000 Subject: Fixes on device auto-detection: - Made USB printer auto-detection routine in "detect_devices.pm" creating the appropriate device nodes (needed for USB printers being recognized during installation). - Fixed "devices.pm" to be able to handle device files with numbers geater than 9 (ex: /dev/usb/lp10). --- perl-install/detect_devices.pm | 1 + perl-install/devices.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 7c33470ff..e658f33e6 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -403,6 +403,7 @@ sub whatUsbport() { my @res = (); foreach $i (0..15) { my $port = "/dev/usb/lp$i"; + devices::make("$port"); open PORT, "$port" or next; my $idstr; # Calculation of IOCTL function 0x84005001 (to get device ID string): diff --git a/perl-install/devices.pm b/perl-install/devices.pm index 4ccac4901..8a3f5ac41 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -111,7 +111,7 @@ sub entry { $type = c::S_IFBLK(); $major = 114; $minor = 16 * $1 + ($2 || 0); - } elsif (/(.*)(\d+)$/) { + } elsif (/(.*\D)(\d+)$/) { ($type, $major, $minor) = @{ ${{"fd" => [ c::S_IFBLK(), 2, 0 ], "hidbp-mse-" => [ c::S_IFCHR(), 10, 32 ], -- cgit v1.2.1