summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2019-04-20 11:20:01 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2019-04-20 21:35:26 +0100
commit9602565a6c602906acb96c3192d8ff168ef5ebea (patch)
tree5024359916b0fd2f0950aa8f1b5a452917fc8617 /perl-install/partition_table.pm
parent6bb20f31aafa5345a949f6439df330e06a8d29bd (diff)
downloaddrakx-9602565a6c602906acb96c3192d8ff168ef5ebea.tar
drakx-9602565a6c602906acb96c3192d8ff168ef5ebea.tar.gz
drakx-9602565a6c602906acb96c3192d8ff168ef5ebea.tar.bz2
drakx-9602565a6c602906acb96c3192d8ff168ef5ebea.tar.xz
drakx-9602565a6c602906acb96c3192d8ff168ef5ebea.zip
Minimise calls to ped_disk_probe() when writing partition tables.
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index da8a15b6e..13715852f 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -273,6 +273,7 @@ sub initialize {
my $current = c::get_disk_type($hd->{file});
$current = 'dos' if $current eq 'msdos';
+ $hd->{current_pt_table_type} = $current;
my $type = $o_type || $current || default_type($hd);
$hd->{pt_table_type} = $type;
@@ -564,6 +565,7 @@ sub write {
$hd->write($handle, $_->{start}, $_->{raw}) or die "writing of partition table failed";
}
$hd->end_write($handle);
+ $hd->{current_pt_table_type} = $hd->{pt_table_type};
$hd->{isDirty} = 0;
if (my $tell_kernel = delete $hd->{will_tell_kernel}) {