From 023feb47d4fc6d04343638288fba247b001f65fd Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 15 Jun 2004 15:26:13 +0000 Subject: use "find { ... }" --- perl-install/fsedit.pm | 4 ++-- 1 file 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} || ''); -- cgit v1.2.1