diff options
author | Thierry Vignaud <tv@mandriva.org> | 2010-01-18 11:22:03 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2010-01-18 11:22:03 +0000 |
commit | d9fc5f70b0c872f66b60649bca9a2fa4eb6aa762 (patch) | |
tree | f7856a021cf6d40be4c0fd59620fdb3088c7dd68 /perl-install/detect_devices.pm | |
parent | e5991ffee0c06f5faa0b9e633728cb2430fd4d3f (diff) | |
download | drakx-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/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 3 |
1 files changed, 2 insertions, 1 deletions
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"))); |