summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-01-17 17:22:00 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-01-17 17:22:00 +0000
commit1799efb03565ab9c12bf0a7982f37a7413d47aba (patch)
tree834aedaa8843e95afbfa44e97079a6a0d7d569a8 /perl-install/partition_table.pm
parent39be5039adbec64a10ae686c35bc93ec5f3fca60 (diff)
downloaddrakx-1799efb03565ab9c12bf0a7982f37a7413d47aba.tar
drakx-1799efb03565ab9c12bf0a7982f37a7413d47aba.tar.gz
drakx-1799efb03565ab9c12bf0a7982f37a7413d47aba.tar.bz2
drakx-1799efb03565ab9c12bf0a7982f37a7413d47aba.tar.xz
drakx-1799efb03565ab9c12bf0a7982f37a7413d47aba.zip
no_comment
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 3bf6506bc..50abce97c 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -14,6 +14,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @important_types @fields2save);
use common qw(:common :system :functional);
use partition_table_dos;
use partition_table_bsd;
+use partition_table_sun;
use Data::Dumper;
@@ -231,7 +232,7 @@ sub verifyParts($) {
}
sub verifyPrimary($) {
my ($pt) = @_;
- $_->{start} > 0 || die "partition must NOT start at sector 0" foreach @{$pt->{normal}};
+ $_->{start} > 0 || arch() eq "sparc" || die "partition must NOT start at sector 0" foreach @{$pt->{normal}};
verifyParts_(@{$pt->{normal}}, $pt->{extended});
}
@@ -328,7 +329,8 @@ sub read_one($$) {
my ($hd, $sector) = @_;
my ($pt, $info);
- foreach ('dos', 'bsd') {
+ foreach ('dos', 'bsd', 'sun', 'unknown') {
+ /unknown/ and die "unknown partition table format";
eval {
bless $hd, "partition_table_$_";
($pt, $info) = $hd->read($sector);
@@ -337,7 +339,8 @@ sub read_one($$) {
$@ or last;
}
- my @extended = grep { isExtended($_) } @$pt;
+
+ my @extended = $hd->hasExtended ? grep { isExtended($_) } @$pt : ();
my @normal = grep { $_->{size} && $_->{type} && !isExtended($_) } @$pt;
@extended > 1 and die "more than one extended partition";