summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-02 21:57:41 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-02 21:57:41 +0000
commit7f75ad9564adab60db74a28c27bdc3b934828cf0 (patch)
tree69acf34d2b131775728bf8969c7d697996cc3448 /perl-install
parent35be2674862ca0019cc14538f37db518bfc1d052 (diff)
downloaddrakx-7f75ad9564adab60db74a28c27bdc3b934828cf0.tar
drakx-7f75ad9564adab60db74a28c27bdc3b934828cf0.tar.gz
drakx-7f75ad9564adab60db74a28c27bdc3b934828cf0.tar.bz2
drakx-7f75ad9564adab60db74a28c27bdc3b934828cf0.tar.xz
drakx-7f75ad9564adab60db74a28c27bdc3b934828cf0.zip
(adjust_local_extended): fix resizing local extended
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/partition_table.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index e40327a00..5e26718ab 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -419,12 +419,13 @@ sub adjust_main_extended {
sub adjust_local_extended {
my ($hd, $part) = @_;
-
- foreach (@{$hd->{extended} || []}) {
- $_->{normal} == $part or next;
- $_->{size} = $part->{size} + $part->{start} - $_->{start};
- last;
- }
+
+ my $extended = find { $_->{normal} == $part } @{$hd->{extended} || []} or return;
+ $extended->{size} = $part->{size} + $part->{start} - $extended->{start};
+
+ #- must write it there too because values are not shared
+ my $prev = find { $_->{extended}{start} == $extended->{start} } @{$hd->{extended} || []} or return;
+ $prev->{extended}{size} = $part->{size} + $part->{start} - $prev->{extended}{start};
}
sub get_normal_parts {