summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-11-16 10:14:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-11-16 10:14:11 +0000
commitbfcc35f8882cb0fbd5c965a43ccd8103e38ed5e6 (patch)
tree29fc62cbe16571e39431bc6b6eca9a6143e699fe /perl-install/partition_table.pm
parent81966041225bbca4aae4acf0cf141645dffedc03 (diff)
downloaddrakx-bfcc35f8882cb0fbd5c965a43ccd8103e38ed5e6.tar
drakx-bfcc35f8882cb0fbd5c965a43ccd8103e38ed5e6.tar.gz
drakx-bfcc35f8882cb0fbd5c965a43ccd8103e38ed5e6.tar.bz2
drakx-bfcc35f8882cb0fbd5c965a43ccd8103e38ed5e6.tar.xz
drakx-bfcc35f8882cb0fbd5c965a43ccd8103e38ed5e6.zip
create isEmpty() and use it instead of simply testing {pt_type}, since {pt_type} can be undef whereas {fs_type} is set
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 1d5e87e47..88bbcfd74 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -227,7 +227,7 @@ sub get_normal_parts_and_holes {
} sort { $a->{start} <=> $b->{start} } grep { !isWholedisk($_) } get_normal_parts($hd);
push @l, { start => $start, size => $last - $start, %$minimal_hole };
- grep { $_->{pt_type} || $_->{size} >= $hd->cylinder_size } @l;
+ grep { !isEmpty($_) || $_->{size} >= $hd->cylinder_size } @l;
}
sub read_one($$) {
@@ -264,8 +264,8 @@ sub read_one($$) {
}
my @extended = $hd->hasExtended ? grep { isExtended($_) } @$pt : ();
- my @normal = grep { $_->{size} && $_->{pt_type} && !isExtended($_) } @$pt;
- my $nb_special_empty = int(grep { $_->{size} && $_->{pt_type} == 0 } @$pt);
+ my @normal = grep { $_->{size} && !isEmpty($_) && !isExtended($_) } @$pt;
+ my $nb_special_empty = int(grep { $_->{size} && isEmpty($_) } @$pt);
@extended > 1 and die "more than one extended partition";