summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-01-24 15:12:16 +0000
committerFrancois Pons <fpons@mandriva.com>2000-01-24 15:12:16 +0000
commita31aa764b35315eda2caf3bd269db45fc56a9d66 (patch)
treedf5c8c426e21dddb236a4e600ab7162c1806c758 /perl-install/partition_table.pm
parent7fa1fd93ecd790ae288102dcb4ec4cf3ca3bc760 (diff)
downloaddrakx-a31aa764b35315eda2caf3bd269db45fc56a9d66.tar
drakx-a31aa764b35315eda2caf3bd269db45fc56a9d66.tar.gz
drakx-a31aa764b35315eda2caf3bd269db45fc56a9d66.tar.bz2
drakx-a31aa764b35315eda2caf3bd269db45fc56a9d66.tar.xz
drakx-a31aa764b35315eda2caf3bd269db45fc56a9d66.zip
*** empty log message ***
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm26
1 files changed, 2 insertions, 24 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 19e425872..82c950349 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -12,6 +12,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @important_types @fields2save);
use common qw(:common :system :functional);
+use partition_table_raw;
use partition_table_dos;
use partition_table_bsd;
use partition_table_sun;
@@ -201,29 +202,6 @@ sub isPrimary($$) {
0;
}
-sub cylinder_size($) {
- my ($hd) = @_;
- $hd->{geom}{sectors} * $hd->{geom}{heads};
-}
-
-sub adjustStart($$) {
- my ($hd, $part) = @_;
- my $end = $part->{start} + $part->{size};
-
- $part->{start} = round_up($part->{start},
- $part->{start} % cylinder_size($hd) < 2 * $hd->{geom}{sectors} ?
- $hd->{geom}{sectors} : cylinder_size($hd));
- $part->{size} = $end - $part->{start};
-}
-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 adjustStartAndEnd($$) {
my ($hd, $part) = @_;
@@ -527,7 +505,7 @@ The only solution is to move your primary partitions to have the hole next to th
my $l = first (@{$hd->{extended}});
#- the first is a special case, must recompute its real size
- $l->{start} = round_down($l->{normal}{start} - 1, cylinder_size($hd));
+ $l->{start} = round_down($l->{normal}{start} - 1, $hd->cylinder_size());
$l->{size} = $l->{normal}{start} + $l->{normal}{size} - $l->{start};
my $ext = { %$l };
unshift @{$hd->{extended}}, { type => 5, raw => [ $part, $ext, {}, {} ], normal => $part, extended => $ext };