summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table_raw.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-02-09 11:40:32 +0000
committerFrancois Pons <fpons@mandriva.com>2000-02-09 11:40:32 +0000
commit77d16a3330cab8b9c86667220114542958e7a348 (patch)
treee7fa44df3f8315f3e9cbad50b87bfc8250aeb6d4 /perl-install/partition_table_raw.pm
parent4ce69234e573c58002f3d1a9f361489410e883b2 (diff)
downloaddrakx-77d16a3330cab8b9c86667220114542958e7a348.tar
drakx-77d16a3330cab8b9c86667220114542958e7a348.tar.gz
drakx-77d16a3330cab8b9c86667220114542958e7a348.tar.bz2
drakx-77d16a3330cab8b9c86667220114542958e7a348.tar.xz
drakx-77d16a3330cab8b9c86667220114542958e7a348.zip
*** empty log message ***
Diffstat (limited to 'perl-install/partition_table_raw.pm')
-rw-r--r--perl-install/partition_table_raw.pm16
1 files changed, 12 insertions, 4 deletions
diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table_raw.pm
index e48cddce0..2acd60004 100644
--- a/perl-install/partition_table_raw.pm
+++ b/perl-install/partition_table_raw.pm
@@ -48,12 +48,20 @@ sub adjustStart($$) {
sub adjustEnd($$) {
my ($hd, $part) = @_;
my $end = $part->{start} + $part->{size};
- my $end2 = round_down($end, cylinder_size($hd));
- unless ($part->{start} < $end2) {
- $end2 = round_up($end, cylinder_size($hd));
- }
+ my $end2 = round_up($end, cylinder_size($hd));
+ $end2 = $hd->{geom}{cylinders} * cylinder_size($hd) if $end2 > $hd->{geom}{cylinders} * cylinder_size($hd);
$part->{size} = $end2 - $part->{start};
}
+#- previous version of adjustEnd, should check for numbers about partition start/end.
+#sub adjustEnd($$) {
+# my ($hd, $part) = @_;
+# my $end = $part->{start} + $part->{size};
+# 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 get_geometry($) {
my ($dev) = @_;