summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-03-25 06:09:44 -0400
committerThierry Vignaud <thierry.vignaud@gmail.com>2015-03-25 19:55:32 +0100
commit726c4d452fe00595bf1ce7c49f5084b5de2eb9e6 (patch)
tree296288fef659442079417b812405e6a381135bfa /perl-install/partition_table
parentc6399f588983503120e93c50963c56bb7708a2d0 (diff)
downloaddrakx-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
Diffstat (limited to 'perl-install/partition_table')
-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";