From abdedba4dcf279dce0fdc6b7b25535e56f23e11b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 28 Aug 2002 09:40:38 +0000 Subject: (partition_table::dos::last_usable_sector): don't use totalsectors, compute it so that it is cylinder aligned --- perl-install/partition_table/dos.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'perl-install/partition_table/dos.pm') 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); -- cgit v1.2.1