summaryrefslogtreecommitdiffstats
path: root/perl-install/fs/partitioning.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/fs/partitioning.pm')
-rw-r--r--perl-install/fs/partitioning.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/fs/partitioning.pm b/perl-install/fs/partitioning.pm
index ab2b6733a..18fa7e114 100644
--- a/perl-install/fs/partitioning.pm
+++ b/perl-install/fs/partitioning.pm
@@ -1,16 +1,18 @@
-package fs::partitioning; # $Id$
+package fs::partitioning;
use diagnostics;
use strict;
use common;
use fs::format;
+use fs::get;
use fs::type;
sub guess_partitions_to_format {
my ($fstab) = @_;
+ my $root_part = fs::get::root($fstab);
foreach (@$fstab) {
- $_->{mntpoint} = "swap" if isSwap($_);
+ $_->{mntpoint} = "swap" if isSwap($_) && ($_->{rootDevice} eq $root_part->{rootDevice} || !$_->{is_removable} && !$root_part->{is_removable});
$_->{mntpoint} or next;
add2hash_($_, { toFormat => $_->{notFormatted} }) if $_->{fs_type}; #- eg: do not set toFormat for isRawRAID (0xfd)
@@ -45,14 +47,14 @@ sub choose_partitions_to_format {
$in->ask_from_(
{ messages => N("Choose the partitions you want to format"),
interactive_help_id => 'formatPartitions',
- advanced_messages => N("Check bad blocks?"),
+ advanced_messages => N("Check for bad blocks?"),
},
[ map {
my $e = $_;
({
text => partition_table::description($e), type => 'bool',
val => \$e->{toFormatTmp}
- }, if_(!isLoopback($_) && !member($_->{fs_type}, 'reiserfs', 'xfs', 'jfs'), {
+ }, if_(!isLoopback($_) && isBlockCheckable($_), {
text => partition_table::description($e), type => 'bool', advanced => 1,
disabled => sub { !$e->{toFormatTmp} },
val => \$e->{toFormatCheck}