diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-06-15 15:26:13 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-06-15 15:26:13 +0000 |
commit | 023feb47d4fc6d04343638288fba247b001f65fd (patch) | |
tree | 22ba5c60d99cad6f94f5fb318c39ae93f87cbc0c /perl-install/fsedit.pm | |
parent | ffb1cd20b1e8d389b9136ca513eeb4b479e1bc28 (diff) | |
download | drakx-023feb47d4fc6d04343638288fba247b001f65fd.tar drakx-023feb47d4fc6d04343638288fba247b001f65fd.tar.gz drakx-023feb47d4fc6d04343638288fba247b001f65fd.tar.bz2 drakx-023feb47d4fc6d04343638288fba247b001f65fd.tar.xz drakx-023feb47d4fc6d04343638288fba247b001f65fd.zip |
use "find { ... }"
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r-- | perl-install/fsedit.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index cc6129991..8cdfe6d91 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -295,8 +295,8 @@ sub read_proc_partitions { $part->{rootDevice} = $devfs2normal{dirname($part->{dev}) . '/disc'}; } else { $dev = $part->{dev}; - foreach my $hd (@$hds) { - $part->{rootDevice} = $hd->{device} if $part->{dev} =~ /^$hd->{device}./; + if (my $hd = find { $part->{dev} =~ /^$_->{device}./ } @$hds) { + $part->{rootDevice} = $hd->{device}; } } undef $prev_part if $prev_part && ($prev_part->{rootDevice} || '') ne ($part->{rootDevice} || ''); |