summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table/gpt.pm
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2015-02-03 22:43:25 +0000
committerPascal Terjan <pterjan@gmail.com>2015-02-03 22:43:25 +0000
commitec943bda7b15ac69dc85cb04865e09e6b21f7177 (patch)
treec10713368f5b7548a39bae6afd3da1d06dada255 /perl-install/partition_table/gpt.pm
parentbc58011804080303cd6e3c15a3f39bc95c961431 (diff)
downloaddrakx-ec943bda7b15ac69dc85cb04865e09e6b21f7177.tar
drakx-ec943bda7b15ac69dc85cb04865e09e6b21f7177.tar.gz
drakx-ec943bda7b15ac69dc85cb04865e09e6b21f7177.tar.bz2
drakx-ec943bda7b15ac69dc85cb04865e09e6b21f7177.tar.xz
drakx-ec943bda7b15ac69dc85cb04865e09e6b21f7177.zip
Fix partition number in GPT for empty disks
Diffstat (limited to 'perl-install/partition_table/gpt.pm')
-rw-r--r--perl-install/partition_table/gpt.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm
index 170afc5ea..31f7ba855 100644
--- a/perl-install/partition_table/gpt.pm
+++ b/perl-install/partition_table/gpt.pm
@@ -155,7 +155,8 @@ sub initialize {
my ($class, $hd) = @_;
my @raw;
for (my $part_number = 0; $part_number < $nb_primary-1; $part_number++) {
- $raw[$part_number] = { part_number => $part_number };
+ # part_number starts at 1
+ $raw[$part_number] = { part_number => $part_number + 1};
}
$hd->{primary} = { raw => \@raw };
bless $hd, $class;