From e6e178ef0973bbe18d18d6b5314f9dacafce3592 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 23 May 2012 18:27:28 +0000 Subject: (_format_raw) factorize with similar code --- perl-install/diskdrake/interactive.pm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'perl-install/diskdrake/interactive.pm') diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index af71d894f..8a4d9bb9c 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -568,13 +568,7 @@ First remove a primary partition and create an extended partition.")); if ($::isStandalone) { fs::format::check_package_is_installed_format($in->do_pkgs, $p->{fs_type}) or log::l("Missing package"); } - if ($::expert && !member($p->{fs_type}, 'reiserfs', 'xfs', 'hfs', 'ntfs', 'ntfs-3g')) { - $p->{toFormatCheck} = $in->ask_yesorno(N("Confirmation"), N("Check for bad blocks?")); - } - $p->{isFormatted} = 0; #- force format; - # Wait for the newly created device to appear before formatting it - my ($_w, $wait_message) = $in->wait_message_with_progress_bar; - fs::format::part($all_hds, $p, $wait_message) unless isRawLVM($p); + _format_raw($in, $p, $all_hds, isRawLVM($p)); } warn_if_renumbered($in, $hd); @@ -1294,13 +1288,14 @@ sub format_ { } sub _format_raw { - my ($in, $part, $all_hds) = @_; + my ($in, $part, $all_hds, $o_skip) = @_; if ($::expert && !member($part->{fs_type}, 'reiserfs', 'xfs', 'hfs', 'ntfs', 'ntfs-3g')) { $part->{toFormatCheck} = $in->ask_yesorno(N("Confirmation"), N("Check for bad blocks?")); } $part->{isFormatted} = 0; #- force format; + # Wait for the newly created device to appear before formatting it my ($_w, $wait_message) = $in->wait_message_with_progress_bar; - fs::format::part($all_hds, $part, $wait_message); + fs::format::part($all_hds, $part, $wait_message) if !$o_skip; 1; } -- cgit v1.2.1