From 9602565a6c602906acb96c3192d8ff168ef5ebea Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 20 Apr 2019 11:20:01 +0100 Subject: Minimise calls to ped_disk_probe() when writing partition tables. --- perl-install/partition_table/gpt.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perl-install/partition_table') diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm index e1c07a761..af5509f27 100644 --- a/perl-install/partition_table/gpt.pm +++ b/perl-install/partition_table/gpt.pm @@ -87,7 +87,7 @@ sub write { my $partitions_killed; # Initialize the disk if current partition table is not gpt - if (c::get_disk_type($hd->{file}) ne "gpt") { + if ($hd->{current_pt_table_type} ne "gpt") { $ped_disk = c::disk_open($hd->{file}, "gpt") or die "failed to create new partition table on $hd->{file}"; $partitions_killed = 1; } else { -- cgit v1.2.1