summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/partition_table')
-rw-r--r--perl-install/partition_table/gpt.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm
index 5ef358e82..c5af99275 100644
--- a/perl-install/partition_table/gpt.pm
+++ b/perl-install/partition_table/gpt.pm
@@ -113,11 +113,8 @@ sub write {
sub initialize {
my ($class, $hd) = @_;
- my @raw;
- for (my $part_number = 0; $part_number < $nb_primary-1; $part_number++) {
- # part_number starts at 1
- $raw[$part_number] = { part_number => $part_number + 1 };
- }
+ # part_number starts at 1
+ my @raw = map { +{ part_number => $_ + 1 } } 0..$nb_primary-2;
$hd->{primary} = { raw => \@raw };
bless $hd, $class;
}