summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table/dos.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-28 09:40:38 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-28 09:40:38 +0000
commitabdedba4dcf279dce0fdc6b7b25535e56f23e11b (patch)
tree401292f2252b9622ea4152b60affc4bfb25dfc14 /perl-install/partition_table/dos.pm
parent649015ba83578ac4a5b89242ccb1a50c630afa4f (diff)
downloaddrakx-abdedba4dcf279dce0fdc6b7b25535e56f23e11b.tar
drakx-abdedba4dcf279dce0fdc6b7b25535e56f23e11b.tar.gz
drakx-abdedba4dcf279dce0fdc6b7b25535e56f23e11b.tar.bz2
drakx-abdedba4dcf279dce0fdc6b7b25535e56f23e11b.tar.xz
drakx-abdedba4dcf279dce0fdc6b7b25535e56f23e11b.zip
(partition_table::dos::last_usable_sector): don't use totalsectors, compute it so that it is cylinder aligned
Diffstat (limited to 'perl-install/partition_table/dos.pm')
-rw-r--r--perl-install/partition_table/dos.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/partition_table/dos.pm b/perl-install/partition_table/dos.pm
index a6ad4be76..3518e6738 100644
--- a/perl-install/partition_table/dos.pm
+++ b/perl-install/partition_table/dos.pm
@@ -20,6 +20,12 @@ my $offset = $common::SECTORSIZE - length($magic) - $nb_primary * common::psizeo
sub hasExtended { 1 }
+sub last_usable_sector {
+ my ($hd) = @_;
+ #- do not use totalsectors, see gi/docs/Partition-ends-after-end-of-disk.txt for more
+ $hd->{geom}{sectors} * $hd->{geom}{heads} * $hd->{geom}{cylinders};
+}
+
sub compute_CHS($$) {
my ($hd, $e) = @_;
my @l = qw(cyl head sec);