summaryrefslogtreecommitdiffstats
path: root/perl-install/scanner.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-27 20:50:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-27 20:50:12 +0000
commitb0d554c4155060ed665844fdf7b2a08db9bb3356 (patch)
treed1236029c2ac147b49a2da74bf132c3f56619406 /perl-install/scanner.pm
parentc2b148e1e94892d8d72000ed087b607ae28b5808 (diff)
downloaddrakx-backup-do-not-use-b0d554c4155060ed665844fdf7b2a08db9bb3356.tar
drakx-backup-do-not-use-b0d554c4155060ed665844fdf7b2a08db9bb3356.tar.gz
drakx-backup-do-not-use-b0d554c4155060ed665844fdf7b2a08db9bb3356.tar.bz2
drakx-backup-do-not-use-b0d554c4155060ed665844fdf7b2a08db9bb3356.tar.xz
drakx-backup-do-not-use-b0d554c4155060ed665844fdf7b2a08db9bb3356.zip
perl_checker adaptations
Diffstat (limited to 'perl-install/scanner.pm')
-rwxr-xr-xperl-install/scanner.pm15
1 files changed, 6 insertions, 9 deletions
diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm
index 3c9ff6ff2..8eef579ff 100755
--- a/perl-install/scanner.pm
+++ b/perl-install/scanner.pm
@@ -32,7 +32,7 @@ use log;
my $_sanedir = "$prefix/etc/sane.d";
my $_scannerDBdir = "$prefix$ENV{SHARE_PATH}/ldetect-lst";
-$scannerDB = readScannerDB("$_scannerDBdir/ScannerDB");
+my $scannerDB = readScannerDB("$_scannerDBdir/ScannerDB");
sub confScanner {
my ($model, $port) = @_;
@@ -167,15 +167,12 @@ sub updateScannerDBfromSane {
"UMAX" => "Umax",
"Vobis/Highscreen" => "Vobis",
};
-
- opendir YREP, $_sanesrcdir or die "can't open $_sanesrcdir: $!";
- @files = grep /.*desc$/, readdir YREP;
- closedir YREP;
- foreach my $i (@files) {
- my $F = common::openFileMaybeCompressed("$_sanesrcdir/$i");
- print Y "\n# from $i";
+
+ foreach my $f (glob_("$_sanesrcdir/*.desc")) {
+ my $F = common::openFileMaybeCompressed($f);
+ print Y "\n# from $f";
my ($lineno, $cmd, $val) = 0;
- my ($name, $intf, $comment,$mfg);
+ my ($name, $intf, $comment, $mfg, $backend);
my $fs = {
backend => sub { $backend = $val },
mfg => sub { $mfg = $val; $name = undef },#bug when a new mfg comes. should called $fs->{ $name }(); but ??