summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-09-16 18:35:17 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-09-16 18:35:17 +0000
commitd5c7286f0f7d5cd85442be28efa46822604d3150 (patch)
treebc0680f324998dc86a20c2100fb8a002702f434a
parent8ae83fdf2fbd039b9bbde800fd147eef09eb7f88 (diff)
downloaddrakx-d5c7286f0f7d5cd85442be28efa46822604d3150.tar
drakx-d5c7286f0f7d5cd85442be28efa46822604d3150.tar.gz
drakx-d5c7286f0f7d5cd85442be28efa46822604d3150.tar.bz2
drakx-d5c7286f0f7d5cd85442be28efa46822604d3150.tar.xz
drakx-d5c7286f0f7d5cd85442be28efa46822604d3150.zip
(complete_usb_storage_info) fix getting data when multiple USB disks
of the same vendor are plugged right thing would be to compare {host} but usb_probde() cannot return SCSI host, thus descriptions might be switched if the manufacturer altered them on latest discs rationale:
-rw-r--r--perl-install/detect_devices.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 5d00955d1..a2f07aa14 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -140,7 +140,8 @@ sub complete_usb_storage_info {
my @usb = grep { exists $_->{usb_vendor} } @l;
foreach my $usb (usb_probe()) {
- if (my $e = find { $_->{usb_vendor} == $usb->{vendor} && $_->{usb_id} == $usb->{id} } @usb) {
+ if (my $e = find { !$_->{found} && $_->{usb_vendor} == $usb->{vendor} && $_->{usb_id} == $usb->{id} } @usb) {
+ $e->{found} = 1;
$e->{"usb_$_"} = $usb->{$_} foreach keys %$usb;
}
}