diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-11-24 15:47:13 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-11-24 15:47:13 +0000 |
commit | 7e33219fbb9aeb7ef06dca4383bacb9951a18392 (patch) | |
tree | c3f910c50ab46524ed021e9c5acfa13afd200637 /perl-install | |
parent | 93d9892214bfc6b2f7294da6ffc3e441d7912d5b (diff) | |
download | drakx-7e33219fbb9aeb7ef06dca4383bacb9951a18392.tar drakx-7e33219fbb9aeb7ef06dca4383bacb9951a18392.tar.gz drakx-7e33219fbb9aeb7ef06dca4383bacb9951a18392.tar.bz2 drakx-7e33219fbb9aeb7ef06dca4383bacb9951a18392.tar.xz drakx-7e33219fbb9aeb7ef06dca4383bacb9951a18392.zip |
fix get_sysfs_usbpath_for_block and callers
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/detect_devices.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index a8c9d311c..61e395dde 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -121,10 +121,10 @@ 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/$e->{device}/$host/../serial")); + $e->{info} = chomp_(cat_("/sys/block/$host/../serial")); $e->{usb_description} = join('|', - chomp_(cat_("/sys/block/$e->{device}/$host/../manufacturer")), - chomp_(cat_("/sys/block/$e->{device}/$host/../product"))); + chomp_(cat_("/sys/block/$host/../manufacturer")), + chomp_(cat_("/sys/block/$host/../product"))); } local $e->{found} = 1; $e->{"usb_$_"} ||= $usb->{$_} foreach keys %$usb; @@ -170,7 +170,7 @@ sub get_sysfs_field_from_link { sub get_sysfs_usbpath_for_block { my ($device) = @_; - my $host = readlink("/sys/block/$device/device"); + my $host = readlink("/sys/block/$device"); $host =~ s!/host.*!!; $host; } @@ -181,7 +181,7 @@ sub get_scsi_driver { foreach (@l) { next if $_->{driver}; my $host = get_sysfs_usbpath_for_block($_->{device}); - $_->{driver} = get_sysfs_field_from_link("/sys/block/$_->{device}/$host", 'driver'); + $_->{driver} = get_sysfs_field_from_link("/sys/block/$host", 'driver'); } } |