summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-19 15:34:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-19 15:34:17 +0000
commit5e39f59fc6aa05e96221665a43c3ed35582fc5b8 (patch)
treef594f516a4b48e97d500540dfff33be2e5081fe1 /perl-install/partition_table
parent0991c940925490069ea3feb2ae4f7d977ab6de84 (diff)
downloaddrakx-5e39f59fc6aa05e96221665a43c3ed35582fc5b8.tar
drakx-5e39f59fc6aa05e96221665a43c3ed35582fc5b8.tar.gz
drakx-5e39f59fc6aa05e96221665a43c3ed35582fc5b8.tar.bz2
drakx-5e39f59fc6aa05e96221665a43c3ed35582fc5b8.tar.xz
drakx-5e39f59fc6aa05e96221665a43c3ed35582fc5b8.zip
- diskdrake :
o do not allow partitions bigger than 2TB-1 on DOS MBR, nor partitions starting above 2TB-1
Diffstat (limited to 'perl-install/partition_table')
-rw-r--r--perl-install/partition_table/dos.pm4
-rw-r--r--perl-install/partition_table/raw.pm3
2 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/partition_table/dos.pm b/perl-install/partition_table/dos.pm
index c12b7cba4..2376fce11 100644
--- a/perl-install/partition_table/dos.pm
+++ b/perl-install/partition_table/dos.pm
@@ -33,6 +33,10 @@ sub last_usable_sector {
$hd->{geom}{sectors} * $hd->{geom}{heads} * $hd->{geom}{cylinders};
}
+my $two_TB = 2 * 1024 * 1024 * 2048;
+sub max_partition_start { $two_TB - 1 }
+sub max_partition_size { $two_TB - 1 }
+
sub get_rawCHS {
my ($part) = @_;
diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm
index 925ae6562..c3bc9dcce 100644
--- a/perl-install/partition_table/raw.pm
+++ b/perl-install/partition_table/raw.pm
@@ -69,6 +69,9 @@ sub last_usable_sector {
my ($hd) = @_;
$hd->{totalsectors};
}
+# no limit
+sub max_partition_start { 1e99 }
+sub max_partition_size { 1e99 }
#- default method for starting a partition, only head size or twice
#- is allowed for starting a partition after a cylinder boundarie.