From c2954539b2eb3001ae5c03006283f1c753c4f6f1 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 21 Feb 2000 20:06:46 +0000 Subject: *** empty log message *** --- perl-install/partition_table.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'perl-install/partition_table.pm') 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! -- cgit v1.2.1