diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-03-25 06:09:44 -0400 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-03-25 19:55:32 +0100 |
commit | 726c4d452fe00595bf1ce7c49f5084b5de2eb9e6 (patch) | |
tree | 296288fef659442079417b812405e6a381135bfa | |
parent | c6399f588983503120e93c50963c56bb7708a2d0 (diff) | |
download | drakx-726c4d452fe00595bf1ce7c49f5084b5de2eb9e6.tar drakx-726c4d452fe00595bf1ce7c49f5084b5de2eb9e6.tar.gz drakx-726c4d452fe00595bf1ce7c49f5084b5de2eb9e6.tar.bz2 drakx-726c4d452fe00595bf1ce7c49f5084b5de2eb9e6.tar.xz drakx-726c4d452fe00595bf1ce7c49f5084b5de2eb9e6.zip |
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
-rw-r--r-- | perl-install/partition_table/gpt.pm | 4 |
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"; |