summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/partition_table/gpt.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm
index 3d4206f68..a1d8b84f8 100644
--- a/perl-install/partition_table/gpt.pm
+++ b/perl-install/partition_table/gpt.pm
@@ -130,7 +130,7 @@ sub read_one {
}
sub write {
- my ($hd, $_sector, $_pt, $_info) = @_;
+ my ($hd, $_sector, $pt, $_info) = @_;
my $partitions_killed;
@@ -142,7 +142,7 @@ sub write {
foreach (@{$hd->{will_tell_kernel}}) {
my ($action, $part_number, $o_start, $o_size) = @$_;
- my $part;
+ my ($part) = grep { $_->{start} == $o_start && $_->{size} == $o_size } @$pt;
print "($action, $part_number, $o_start, $o_size)\n";
if ($action eq 'add') {
c::disk_add_partition($hd->{file}, $o_start, $o_size, $part->{fs_type}) or die "failed to add partition";