diff options
author | Francois Pons <fpons@mandriva.com> | 2000-02-21 20:06:46 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-02-21 20:06:46 +0000 |
commit | c2954539b2eb3001ae5c03006283f1c753c4f6f1 (patch) | |
tree | e30561b46d5a15409b191d64a117fc072c2bea93 /perl-install/partition_table.pm | |
parent | 8abe7a7e8c29a95d8229577b5ff0afaa74589fcc (diff) | |
download | drakx-c2954539b2eb3001ae5c03006283f1c753c4f6f1.tar drakx-c2954539b2eb3001ae5c03006283f1c753c4f6f1.tar.gz drakx-c2954539b2eb3001ae5c03006283f1c753c4f6f1.tar.bz2 drakx-c2954539b2eb3001ae5c03006283f1c753c4f6f1.tar.xz drakx-c2954539b2eb3001ae5c03006283f1c753c4f6f1.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r-- | perl-install/partition_table.pm | 9 |
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! |