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.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index b7ddb5cb5..4912f7fc3 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -735,10 +735,12 @@ sub add {
eval { add_primary($hd, $part) };
goto success if !$@;
}
- eval { add_extended($hd, $part, $primaryOrExtended) } if $hd->hasExtended; #- try adding extended
- if ($@ || !$hd->hasExtended) {
- eval { add_primary($hd, $part) };
- die $@ if $@; #- send the add extended error which should be better
+ if ($hd->hasExtended) {
+ eval { add_extended($hd, $part, $primaryOrExtended) };
+ goto success if !$@;
+ }
+ {
+ add_primary($hd, $part);
}
success:
assign_device_numbers($hd);