diff options
author | Francois Pons <fpons@mandriva.com> | 2000-01-24 13:11:27 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-01-24 13:11:27 +0000 |
commit | fe0e92f4e338bd3ab690e409ff9ccde6cfe58780 (patch) | |
tree | 90162d89089414633e30308971a9e715f1b1363c /perl-install/partition_table_raw.pm | |
parent | 9e683c898b6592aaac1196f76dd9321c4426c912 (diff) | |
download | drakx-fe0e92f4e338bd3ab690e409ff9ccde6cfe58780.tar drakx-fe0e92f4e338bd3ab690e409ff9ccde6cfe58780.tar.gz drakx-fe0e92f4e338bd3ab690e409ff9ccde6cfe58780.tar.bz2 drakx-fe0e92f4e338bd3ab690e409ff9ccde6cfe58780.tar.xz drakx-fe0e92f4e338bd3ab690e409ff9ccde6cfe58780.zip |
first sparc release of DrakX.
Diffstat (limited to 'perl-install/partition_table_raw.pm')
-rw-r--r-- | perl-install/partition_table_raw.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table_raw.pm index 39277bf39..cafb439f9 100644 --- a/perl-install/partition_table_raw.pm +++ b/perl-install/partition_table_raw.pm @@ -40,6 +40,9 @@ sub get_geometry($) { my %geom; @geom{qw(heads sectors cylinders start)} = unpack "CCSL", $g; + #- handle this strange but necessary reduction of visible cylinders on sparc, assume 2 for instance. + $geom{total_cylinders} = $geom{cylinders}; $geom{cylinders} -= 2 if arch() =~ /^sparc/; + { geom => \%geom, totalsectors => $geom{heads} * $geom{sectors} * $geom{cylinders} }; } @@ -55,7 +58,7 @@ sub kernel_read($) { sub zero_MBR($) { my ($hd) = @_; # unless (ref($hd) =~ /partition_table/) { - my $type = arch() eq "alpha" ? "bsd" : arch() eq "sparc" ? "sun" : "dos"; + my $type = arch() eq "alpha" ? "bsd" : arch() =~ /^sparc/ ? "sun" : "dos"; bless $hd, "partition_table_$type"; # } $hd->{isDirty} = $hd->{needKernelReread} = 1; |