diff options
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r-- | perl-install/partition_table.pm | 8 |
1 files changed, 5 insertions, 3 deletions
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; |