summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-01-03 17:33:55 +0000
committerFrancois Pons <fpons@mandriva.com>2001-01-03 17:33:55 +0000
commit9017a1ab188ea263b94afa11b58b143bfd42bf09 (patch)
tree33ab6d85a83b5b33452119d05e5b997880257a3a /perl-install/partition_table.pm
parented3b2f0c1f158c4e0d237524275bcf422774fa96 (diff)
downloaddrakx-9017a1ab188ea263b94afa11b58b143bfd42bf09.tar
drakx-9017a1ab188ea263b94afa11b58b143bfd42bf09.tar.gz
drakx-9017a1ab188ea263b94afa11b58b143bfd42bf09.tar.bz2
drakx-9017a1ab188ea263b94afa11b58b143bfd42bf09.tar.xz
drakx-9017a1ab188ea263b94afa11b58b143bfd42bf09.zip
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.
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm18
1 files changed, 14 insertions, 4 deletions
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);
+ }
}
}
}