From 643921ac883be8af9dad01e441028d3564aea565 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 13 Aug 1999 14:36:52 +0000 Subject: no_comment --- perl-install/partition_table.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'perl-install/partition_table.pm') diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index a4bb4bbb8..861c657e2 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -118,9 +118,11 @@ sub adjustStart($$) { sub adjustEnd($$) { my ($hd, $part) = @_; my $end = $part->{start} + $part->{size}; - - $end = round_down($end, cylinder_size($hd)); - $part->{size} = $end - $part->{start}; + my $end2 = round_down($end, cylinder_size($hd)); + unless ($part->{start} < $end2) { + $end2 = round_up($end, cylinder_size($hd)); + } + $part->{size} = $end2 - $part->{start}; } sub adjustStartAndEnd($$) { &adjustStart; -- cgit v1.2.1