summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-02-21 20:06:46 +0000
committerFrancois Pons <fpons@mandriva.com>2000-02-21 20:06:46 +0000
commitc2954539b2eb3001ae5c03006283f1c753c4f6f1 (patch)
treee30561b46d5a15409b191d64a117fc072c2bea93 /perl-install/partition_table.pm
parent8abe7a7e8c29a95d8229577b5ff0afaa74589fcc (diff)
downloaddrakx-backup-do-not-use-c2954539b2eb3001ae5c03006283f1c753c4f6f1.tar
drakx-backup-do-not-use-c2954539b2eb3001ae5c03006283f1c753c4f6f1.tar.gz
drakx-backup-do-not-use-c2954539b2eb3001ae5c03006283f1c753c4f6f1.tar.bz2
drakx-backup-do-not-use-c2954539b2eb3001ae5c03006283f1c753c4f6f1.tar.xz
drakx-backup-do-not-use-c2954539b2eb3001ae5c03006283f1c753c4f6f1.zip
*** empty log message ***
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 518734f5a..7faaa1666 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -224,8 +224,8 @@ sub verifyParts_ {
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;
+ 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);
}
}
}
@@ -408,6 +408,11 @@ sub write($) {
for ($hd->{primary}{raw}) {
(grep { $_->{local_start} = $_->{start}; $_->{active} ||= 0 } @$_) or $_->[0]{active} = 0x80;
}
+
+ #- last chance for verification, this make sure if an error is detected,
+ #- it will never be writed back on partition table.
+ verifyParts($hd);
+
$hd->write(0, $hd->{primary}{raw}, $hd->{primary}{info}) or die "writing of partition table failed";
#- should be fixed but a extended exist with no real extended partition, that blanks mbr!