diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-07-04 16:43:01 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-07-04 16:46:00 +0200 |
commit | 1f8f60631b6dd0f12dd24b993b9961814f734fc6 (patch) | |
tree | 66a7f07cd5e8099b51f8d81d8ee31cc7c0a2755b /perl-install/fs | |
parent | ef6f00d56d393d45a77657e85c8cc905f88b5477 (diff) | |
download | drakx-1f8f60631b6dd0f12dd24b993b9961814f734fc6.tar drakx-1f8f60631b6dd0f12dd24b993b9961814f734fc6.tar.gz drakx-1f8f60631b6dd0f12dd24b993b9961814f734fc6.tar.bz2 drakx-1f8f60631b6dd0f12dd24b993b9961814f734fc6.tar.xz drakx-1f8f60631b6dd0f12dd24b993b9961814f734fc6.zip |
factorize bad block checks
also enable bad blocks checking on JFS (was in one place but not in
other and indeed mkfs.jfs does support it)
Diffstat (limited to 'perl-install/fs')
-rw-r--r-- | perl-install/fs/partitioning.pm | 2 | ||||
-rw-r--r-- | perl-install/fs/type.pm | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/fs/partitioning.pm b/perl-install/fs/partitioning.pm index 27b5220c9..b93d146b2 100644 --- a/perl-install/fs/partitioning.pm +++ b/perl-install/fs/partitioning.pm @@ -52,7 +52,7 @@ sub choose_partitions_to_format { ({ text => partition_table::description($e), type => 'bool', val => \$e->{toFormatTmp} - }, if_(!isLoopback($_) && !member($_->{fs_type}, qw(btrfs jfs reiserfs xfs)), { + }, if_(!isLoopback($_) && isBlockCheckable($_), { text => partition_table::description($e), type => 'bool', advanced => 1, disabled => sub { !$e->{toFormatTmp} }, val => \$e->{toFormatCheck} diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm index 46e0e97d8..f3b35a6a6 100644 --- a/perl-install/fs/type.pm +++ b/perl-install/fs/type.pm @@ -9,7 +9,7 @@ use devices; our @ISA = qw(Exporter); our @EXPORT = qw( - isEmpty isExtended isTrueLocalFS isTrueFS isDos isSwap isOtherAvailableFS isRawLVM isRawRAID isRawLUKS isRAID isLVM isLUKS isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isLoopback isMounted isBusy isSpecial isApple isAppleBootstrap isBIOS_GRUB isESP isFat_or_NTFS isnormal_Fat_or_NTFS isRecovery + isBlockCheckable isEmpty isExtended isTrueLocalFS isTrueFS isDos isSwap isOtherAvailableFS isRawLVM isRawRAID isRawLUKS isRAID isLVM isLUKS isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isLoopback isMounted isBusy isSpecial isApple isAppleBootstrap isBIOS_GRUB isESP isFat_or_NTFS isnormal_Fat_or_NTFS isRecovery maybeFormatted set_isFormatted defaultFS ); @@ -296,6 +296,7 @@ sub isEmpty { !$_[0]{fs_type} && $_[0]{pt_type} == 0 } sub isBIOS_GRUB { $_[0]{pt_type} eq 'BIOS_GRUB' } sub isESP { $_[0]{pt_type} == 0xef && member($_[0]{fs_type}, qw(fat32 vfat)) } sub isExtended { $_[0]{pt_type} == 5 || $_[0]{pt_type} == 0xf || $_[0]{pt_type} == 0x85 } +sub isBlockCheckable { member($_[0]{fs_type}, qw(btrfs hfs ntfs ntfs-3g reiserfs xfs)) } sub isRawLVM { $_[0]{pt_type} == 0x8e || $_[0]{type_name} eq 'Linux Logical Volume Manager' } sub isRawRAID { $_[0]{pt_type} == 0xfd || $_[0]{type_name} eq 'Linux RAID' } sub isRawLUKS { $_[0]{type_name} eq 'Encrypted' } |