diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-03-04 12:34:09 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-03-14 22:22:31 +0000 |
commit | 299738fd1af3a9d854e00a2c3a4e743cf6ec15f4 (patch) | |
tree | ecdd0fccc36be21ab73872cbe0e00373f0369e54 /perl-install/fsedit.pm | |
parent | 50256e67c037ccf31e76cce29a8db082dc8541c9 (diff) | |
download | drakx-299738fd1af3a9d854e00a2c3a4e743cf6ec15f4.tar drakx-299738fd1af3a9d854e00a2c3a4e743cf6ec15f4.tar.gz drakx-299738fd1af3a9d854e00a2c3a4e743cf6ec15f4.tar.bz2 drakx-299738fd1af3a9d854e00a2c3a4e743cf6ec15f4.tar.xz drakx-299738fd1af3a9d854e00a2c3a4e743cf6ec15f4.zip |
Remove redundant code when initialising a partition table.
Now we force the kernel to reread the partition table when we initialise
it, there's no need to also inform it that we've deleted all the existing
partitions.
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r-- | perl-install/fsedit.pm | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index cfde46dd6..2fcd1f1ee 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -209,7 +209,7 @@ sub get_hds { if ($flags->{clearall} || member($hd->{device}, @{$flags->{clear} || []})) { my $lvms = []; #- temporary one, will be re-created later in get_hds() - partition_table_initialize($lvms, $hd, $o_in); + partition_table_clear_and_initialize($lvms, $hd, $o_in); } else { my $handle_die_and_cdie = sub { if (my $type = fs::type::type_subpart_from_magic($hd)) { @@ -628,25 +628,12 @@ sub change_type { =item partition_table_clear_and_initialize($lvms, $hd, $o_in, $o_type, $b_warn) = @_; -wrapper around partition_table::initialize(). - -=cut - -sub partition_table_clear_and_initialize { - my ($lvms, $hd, $o_in, $o_type, $b_warn) = @_; - $hd->clear_existing; - partition_table_initialize($lvms, $hd, $o_in, $o_type, $b_warn); -} - -=item partition_table_initialize($lvms, $hd, $o_in, $o_type, $b_warn) = @_; - -wrapper around partition_table::initialize() like -partition_table_clear_and_initialize() but which also create a singleton VG +wrapper around partition_table::initialize() but which also create a singleton VG automatically (so that it's easier for the user) =cut -sub partition_table_initialize { +sub partition_table_clear_and_initialize { my ($lvms, $hd, $o_in, $o_type, $b_warn) = @_; partition_table::initialize($hd, $o_type); if ($hd->isa('partition_table::lvm')) { |