From 726c4d452fe00595bf1ce7c49f5084b5de2eb9e6 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 25 Mar 2015 06:09:44 -0400 Subject: fix retrieving partition needed for next commit also we were passing '' as fs_type to c::disk_add_partition() $part was undef since commit 9e6b327ca2b1f46db62e0811fabf0a6cf0b114a7 --- perl-install/partition_table/gpt.pm | 4 ++-- 1 file 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"; -- cgit v1.2.1