summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2005-08-05 08:27:33 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2005-08-05 08:27:33 +0000
commitd2b450a1c1b1f70802edbdf228f207239f6e20ca (patch)
tree17c9d32c827e9e9807c34a07abc10d40d82bc437 /perl-install
parent7e9337d87ab32c6949e024ce3879b4f88fb7f494 (diff)
downloaddrakx-d2b450a1c1b1f70802edbdf228f207239f6e20ca.tar
drakx-d2b450a1c1b1f70802edbdf228f207239f6e20ca.tar.gz
drakx-d2b450a1c1b1f70802edbdf228f207239f6e20ca.tar.bz2
drakx-d2b450a1c1b1f70802edbdf228f207239f6e20ca.tar.xz
drakx-d2b450a1c1b1f70802edbdf228f207239f6e20ca.zip
- Bug fixes in scanner::detect() function
o Fixed 'grep' filter to filter out non-scanner devices by the "driver" field (in the very end of the function) o Fixed franglish in a warning message - Suppressed console message of "ls" in the scanner::resolve_symlinks() function.
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/scanner.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm
index fafd36d60..8660aefd3 100755
--- a/perl-install/scanner.pm
+++ b/perl-install/scanner.pm
@@ -284,9 +284,9 @@ sub detect {
my ($device) = grep { sprintf("%04x", $_->{vendor}) eq $vendor && sprintf("%04x", $_->{id}) eq $id } @devices;
if ($device) {
- $driver = $device->{driver};
+ $driver = $device->{driver};
} else {
- warn "i failled to lookupp $vendorid && $productid";
+ #warn "Failed to lookup $vendorid and $productid!\n";
}
# We have vendor and product ID, look up the scanner in
@@ -373,7 +373,7 @@ sub detect {
@res = grep { ! $_->{configured} } @res;
}
# blacklist device that have a driver b/c of buggy sane-find-scanner:
- return grep { member($_->{driver}, qw(scanner unknown)) } @res;
+ return grep { member($_->{val}{driver}, qw(scanner unknown)) } @res;
}
sub resolve_symlinks {
@@ -391,7 +391,7 @@ sub resolve_symlinks {
return $file;
}
while (1) {
- my $ls = `ls -l $file`;
+ my $ls = `ls -l $file 2> /dev/null`;
if ($ls =~ m!\s($file)\s*\->\s*(\S+)\s*$!) {
my $target = $2;
if ($target !~ m!^/! && $file =~ m!^(.*)/[^/]+$!) {