summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-09 03:02:37 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-09 03:02:37 +0000
commit950fe7395621dc21885ac3e1280e007248646608 (patch)
treee3016a95189ee4c75a05b816d91dd22f071bd2c0 /perl-install/partition_table.pm
parentc7df31b71335c18d60cdb8a7f5fee24d56cca4b8 (diff)
downloaddrakx-950fe7395621dc21885ac3e1280e007248646608.tar
drakx-950fe7395621dc21885ac3e1280e007248646608.tar.gz
drakx-950fe7395621dc21885ac3e1280e007248646608.tar.bz2
drakx-950fe7395621dc21885ac3e1280e007248646608.tar.xz
drakx-950fe7395621dc21885ac3e1280e007248646608.zip
no_comment
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 073ecc1c3..652f3f81f 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -6,7 +6,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @important_types @fields2save);
@ISA = qw(Exporter);
%EXPORT_TAGS = (
- types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isSwap isDos isWin isFat isPrimary isNfs) ],
+ types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isSwap isDos isWin isFat isPrimary isNfs isRAID) ],
);
@EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
@@ -167,6 +167,7 @@ sub name2type($) {
}
sub isExtended($) { $_[0]{type} == 5 || $_[0]{type} == 0xf }
+sub isRAID($) { $_[0]{type} == 0xfd }
sub isSwap($) { $type2fs{$_[0]{type}} eq 'swap' }
sub isExt2($) { $type2fs{$_[0]{type}} eq 'ext2' }
sub isDos($) { $ {{ 1=>1, 4=>1, 6=>1 }}{$_[0]{type}} }
@@ -219,7 +220,7 @@ sub verifyInside($$) {
sub verifyParts_ {
foreach my $i (@_) { foreach (@_) {
- $i != $_ and verifyNotOverlap($i, $_) || die "partitions $i->{start} $i->{size} and $_->{start} $_->{size} are overlapping!";
+ $i != $_ and verifyNotOverlap($i, $_) || cdie "partitions sector #$i->{start} ($i->{size}bytes) and sector #$_->{start} ($_->{size}bytes) are overlapping!";
}}
}
sub verifyParts($) {
@@ -294,6 +295,8 @@ sub adjust_main_extended($) {
sub get_normal_parts($) {
my ($hd) = @_;
+ $hd->{raid} and return grep {$_} @{$hd->{raid}};
+
@{$hd->{primary}{normal} || []}, map { $_->{normal} } @{$hd->{extended} || []}
}