summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-10-24 12:16:33 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-10-24 12:16:33 +0000
commitdf986ee73cb5d5b6a91f938b4351698ea359f29f (patch)
tree36313924e4eb63e04514be164f12bf3204fdcb8d /perl-install/partition_table.pm
parent0ccc4da1a3bb759bd4333e92efb4a72366b5cb00 (diff)
downloaddrakx-df986ee73cb5d5b6a91f938b4351698ea359f29f.tar
drakx-df986ee73cb5d5b6a91f938b4351698ea359f29f.tar.gz
drakx-df986ee73cb5d5b6a91f938b4351698ea359f29f.tar.bz2
drakx-df986ee73cb5d5b6a91f938b4351698ea359f29f.tar.xz
drakx-df986ee73cb5d5b6a91f938b4351698ea359f29f.zip
add methods first_usable_sector and last_usable_sector
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 61b6738b2..336e270c8 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -420,7 +420,7 @@ sub get_normal_parts {
sub get_normal_parts_and_holes {
my ($hd) = @_;
- my $start = arch() eq "alpha" ? 2048 : 1;
+ my ($start, $last) = ($hd->first_usable_sector, $hd->last_usable_sector);
ref($hd) or print("get_normal_parts_and_holes: bad hd" . backtrace(), "\n");
@@ -431,7 +431,7 @@ sub get_normal_parts_and_holes {
$hole, $_;
} sort { $a->{start} <=> $b->{start} } grep { !isWholedisk($_) } get_normal_parts($hd);
- push @l, { start => $start, size => $hd->{totalsectors} - $start, type => 0, rootDevice => $hd->{device} };
+ push @l, { start => $start, size => $last - $start, type => 0, rootDevice => $hd->{device} };
grep { $_->{type} || $_->{size} >= $hd->cylinder_size } @l;
}