From 9efb2630cbffd771153c030c5dfacadcd8c2ce48 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 13 Aug 2004 04:43:04 +0000 Subject: (device_name_to_entry) recompute $e->{device} only when needed --- perl-install/standalone/drakupdate_fstab | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'perl-install/standalone/drakupdate_fstab') 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) -- cgit v1.2.1