summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-01-18 11:22:03 +0000
committerThierry Vignaud <tv@mandriva.org>2010-01-18 11:22:03 +0000
commitd9fc5f70b0c872f66b60649bca9a2fa4eb6aa762 (patch)
treef7856a021cf6d40be4c0fd59620fdb3088c7dd68 /perl-install
parente5991ffee0c06f5faa0b9e633728cb2430fd4d3f (diff)
downloaddrakx-d9fc5f70b0c872f66b60649bca9a2fa4eb6aa762.tar
drakx-d9fc5f70b0c872f66b60649bca9a2fa4eb6aa762.tar.gz
drakx-d9fc5f70b0c872f66b60649bca9a2fa4eb6aa762.tar.bz2
drakx-d9fc5f70b0c872f66b60649bca9a2fa4eb6aa762.tar.xz
drakx-d9fc5f70b0c872f66b60649bca9a2fa4eb6aa762.zip
(complete_usb_storage_info) fix retrieving empty info for USB discs
do not overwrite values when we cannot access sysfs (fix "displaying empty info for USB discs" regression "introduced" by path fix in getSCSI() (r263658 by blino on 2009/11/24) that exposed the complete_usb_storage_info() breakage to the real world (was: "fix reading USB details (#55690)")
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/detect_devices.pm3
2 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index ad74081d2..829eb6104 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,6 +1,8 @@
- drakboot:
o fix reading security level
o enable to set bootloader password in high security level
+- harddrake
+ o fix displaying empty info for USB discs
Version 13.4 - 7 January 2009
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index b076187a4..0022d4685 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -121,7 +121,8 @@ sub complete_usb_storage_info {
if (my $e = find { !$_->{found} && $_->{usb_vendor} == $usb->{vendor} && $_->{usb_id} == $usb->{id} } @usb) {
my $host = get_sysfs_usbpath_for_block($e->{device});
if ($host) {
- $e->{info} = chomp_(cat_("/sys/block/$host/../serial"));
+ my $file = "/sys/block/$host/../serial";
+ $e->{info} = chomp_(cat_($file)) if -e $file;
$e->{usb_description} = join('|',
chomp_(cat_("/sys/block/$host/../manufacturer")),
chomp_(cat_("/sys/block/$host/../product")));