summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-04-28 13:10:22 +0000
committerThierry Vignaud <tv@mandriva.org>2009-04-28 13:10:22 +0000
commit6493b456fb913f8aaa6023325066bd61925fa3e6 (patch)
tree7c4c7e6c73c00a702638c01d417ac5f43e3f0e70
parentce077841fee2fe995ccada11ef75604781c3c3d5 (diff)
downloaddrakx-6493b456fb913f8aaa6023325066bd61925fa3e6.tar
drakx-6493b456fb913f8aaa6023325066bd61925fa3e6.tar.gz
drakx-6493b456fb913f8aaa6023325066bd61925fa3e6.tar.bz2
drakx-6493b456fb913f8aaa6023325066bd61925fa3e6.tar.xz
drakx-6493b456fb913f8aaa6023325066bd61925fa3e6.zip
(detect) fix keeping around device as seen by detect_devices for frontends (eg: for harddrake)
(why perl_checker didn't found out the variable referenced out of its scope???)
-rw-r--r--perl-install/scanner.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm
index 81b9ab3c8..3fa4c9bef 100644
--- a/perl-install/scanner.pm
+++ b/perl-install/scanner.pm
@@ -263,6 +263,7 @@ sub detect {
open my $DETECT, "LC_ALL=C sane-find-scanner -q |";
while (my $line = <$DETECT>) {
my ($vendorid, $productid, $make, $model, $description, $port, $driver);
+ my $real_device;
if ($line =~ /^\s*found\s+USB\s+scanner/i) {
# Found an USB scanner
if ($line =~ /vendor=(0x[0-9a-f]+)[^0-9a-f\[]+[^\[]*\[([^\[\]]+)\].*prod(|uct)=(0x[0-9a-f]+)[^0-9a-f\[]+[^\[]*\[([^\[\]]+)\]/) {
@@ -284,6 +285,7 @@ sub detect {
if ($device) {
$driver = $device->{driver};
+ $real_device = $device
} else {
#warn "Failed to lookup $vendorid and $productid!\n";
}
@@ -349,7 +351,7 @@ sub detect {
id => $productid,
vendor => $vendorid,
driver => $driver,
- drakx_device => $device,
+ drakx_device => $real_device,
}
};
}