From 899f293944ef786470f73e7497da3453313cb320 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Tue, 20 Aug 2002 16:48:20 +0000 Subject: - Let all occurences of "Seiko Epson" replaced by "Epson" both in the scanner names read from the ScannerDB and in the names resulting from scanner auto-detection (names from usbtable). So the user gets presented "Epson" and usbtable can have "Epson" names where ScannerDB can have "Seiko Epson" names. - If a scanner is listed as "unsupported" in ScannerDB, the user gets a message instead of scannerdrake silently exiting. --- perl-install/scanner.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'perl-install/scanner.pm') diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm index b3a4a8a52..d8716c84d 100755 --- a/perl-install/scanner.pm +++ b/perl-install/scanner.pm @@ -56,6 +56,7 @@ sub detect { foreach (grep { $_->{driver} =~ /scanner/ } detect_devices::usb_probe()) { #my ($manufacturer, $model) = split '\|', $_->{description}; #$_->{description} =~ s/Hewlett[-\s_]Packard/HP/; + $_->{description} =~ s/Seiko\s+Epson/Epson/i; push @res, { port => "/dev/usb/scanner$i", val => { #CLASS => 'SCANNER', #MODEL => $model, #MANUFACTURER => $manufacturer, @@ -66,6 +67,7 @@ sub detect { ++$i; } foreach (grep { $_->{media_type} =~ /scanner/ } detect_devices::getSCSI()) { + $_->{info} =~ s/Seiko\s+Epson/Epson/i; push @res, { port => "/dev/sg", val => { DESCRIPTION => $_->{info} }, }; @@ -85,10 +87,13 @@ sub readScannerDB { my $fs = { LINE => sub { push @{$card->{lines}}, $val }, NAME => sub { - $cards{$card->{type}} = $card if ($card and !$card->{flags}{unsupported}); + #$cards{$card->{type}} = $card if ($card and !$card->{flags}{unsupported}); + $cards{$card->{type}} = $card if ($card); + $val =~ s/Seiko\s+Epson/Epson/i; $card = { type => $val }; }, SEE => sub { + $val =~ s/Seiko\s+Epson/Epson/i; my $c = $cards{$val} or die "Error in database, invalid reference $val at line $lineno"; push @{$card->{lines}}, @{$c->{lines} || []}; -- cgit v1.2.1