diff options
author | Pascal Terjan <pterjan@gmail.com> | 2015-02-03 22:41:49 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@gmail.com> | 2015-02-03 22:41:49 +0000 |
commit | bc58011804080303cd6e3c15a3f39bc95c961431 (patch) | |
tree | d6e7ff981c6969dbf33d24d5db0b2915eed979c8 /perl-install/partition_table | |
parent | 586710269d03201dcc2b698376e6f332c971825b (diff) | |
download | drakx-bc58011804080303cd6e3c15a3f39bc95c961431.tar drakx-bc58011804080303cd6e3c15a3f39bc95c961431.tar.gz drakx-bc58011804080303cd6e3c15a3f39bc95c961431.tar.bz2 drakx-bc58011804080303cd6e3c15a3f39bc95c961431.tar.xz drakx-bc58011804080303cd6e3c15a3f39bc95c961431.zip |
Fix GPT initialization on empty disk
Diffstat (limited to 'perl-install/partition_table')
-rw-r--r-- | perl-install/partition_table/gpt.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm index 04caf937e..170afc5ea 100644 --- a/perl-install/partition_table/gpt.pm +++ b/perl-install/partition_table/gpt.pm @@ -153,7 +153,11 @@ sub write { sub initialize { my ($class, $hd) = @_; - $hd->{primary} = { raw => [] }; + my @raw; + for (my $part_number = 0; $part_number < $nb_primary-1; $part_number++) { + $raw[$part_number] = { part_number => $part_number }; + } + $hd->{primary} = { raw => \@raw }; bless $hd, $class; } |