From 9017a1ab188ea263b94afa11b58b143bfd42bf09 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 3 Jan 2001 17:33:55 +0000 Subject: fixed overlapping partitions between one extended and one regular primary. should be accepted (log printed instead of error) as diskdrake allow their creation in expert. --- perl-install/partition_table.pm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'perl-install/partition_table.pm') diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 37b9f835f..2bf49a649 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -255,10 +255,20 @@ sub verifyInside($$) { sub verifyParts_ { foreach my $i (@_) { foreach (@_) { - next if !$i || !$_ || $i == $_ || isWholedisk($i); #- avoid testing twice on whole disk for simplicity :-) - isWholedisk($_) ? - verifyInside($i, $_) || cdie sprintf("partitions sector #$i->{start} (%dMB) is not inside whole disk (%dMB)!", $i->{size} >> 11, $_->{size} >> 11) : - verifyNotOverlap($i, $_) || cdie sprintf("partitions sector #$i->{start} (%dMB) and sector #$_->{start} (%dMB) are overlapping!", $i->{size} >> 11, $_->{size} >> 11); + next if !$i || !$_ || $i == $_ || isWholedisk($i) || isExtended($i); #- avoid testing twice for simplicity :-) + if (isWholedisk($_)) { + verifyInside($i, $_) or + cdie sprintf("partition sector #$i->{start} (%dMB) is not inside whole disk (%dMB)!", + $i->{size} >> 11, $_->{size} >> 11); + } elsif (isExtended($_)) { + verifyNotOverlap($i, $_) or + log::l(sprintf("warning partition sector #$i->{start} (%dMB) is overlapping with extended partition!", + $i->{size} >> 11)); #- only warning for this one is acceptable + } else { + verifyNotOverlap($i, $_) or + cdie sprintf("partitions sector #$i->{start} (%dMB) and sector #$_->{start} (%dMB) are overlapping!", + $i->{size} >> 11, $_->{size} >> 11); + } } } } -- cgit v1.2.1