diff options
-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} || ''); |