summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 5d7cbd890..2f86e969a 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -401,7 +401,7 @@ The only solution is to move your primary partitions to have the hole next to th
}
sub add($$;$) {
- my ($hd, $part, $want_primary) = @_;
+ my ($hd, $part, $primaryOrExtended) = @_;
$part->{notFormatted} = 1;
$part->{isFormatted} = 0;
@@ -412,7 +412,8 @@ sub add($$;$) {
my $e = $hd->{primary}{extended};
- if (is_empty_array_ref($hd->{primary}{normal}) || $want_primary) {
+ if ($primaryOrExtended eq 'Primary' ||
+ $primaryOrExtended ne 'Extended' && is_empty_array_ref($hd->{primary}{normal})) {
eval { add_primary($hd, $part) };
return unless $@;
}