diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-08-13 04:43:04 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-08-13 04:43:04 +0000 |
commit | 9efb2630cbffd771153c030c5dfacadcd8c2ce48 (patch) | |
tree | b30d76a54000305ea5f1ccfba6e615f84cd8f654 /perl-install/standalone | |
parent | cfc21c9339ce1306651adf5184f9a39763d0e28f (diff) | |
download | drakx-9efb2630cbffd771153c030c5dfacadcd8c2ce48.tar drakx-9efb2630cbffd771153c030c5dfacadcd8c2ce48.tar.gz drakx-9efb2630cbffd771153c030c5dfacadcd8c2ce48.tar.bz2 drakx-9efb2630cbffd771153c030c5dfacadcd8c2ce48.tar.xz drakx-9efb2630cbffd771153c030c5dfacadcd8c2ce48.zip |
(device_name_to_entry) recompute $e->{device} only when needed
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/drakupdate_fstab | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/perl-install/standalone/drakupdate_fstab b/perl-install/standalone/drakupdate_fstab index 62950def6..2a14ed91b 100755 --- a/perl-install/standalone/drakupdate_fstab +++ b/perl-install/standalone/drakupdate_fstab @@ -75,12 +75,10 @@ sub device_name_to_entry { } else { (my $prefix, $nb) = $name =~ m/^(.*?)(\d*)$/; $e = find { $prefix eq ($_->{prefix} || $_->{device}) } @l; + $e->{device} = ($e->{prefix} || $e->{device}) . $nb; } } - if ($nb) { - $e->{device} = ($e->{prefix} || $e->{device}) . $nb; - } $e ||= {}; unless ($e->{devfs_device} eq $name) { $e->{device} = $name; #- keeping the exact name given (often is the devfs name) |