diff options
Diffstat (limited to 'perl-install/fs/type.pm')
-rw-r--r-- | perl-install/fs/type.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm index e859b6fc2..f16698e23 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 isRAID isLVM isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isLoopback isMounted isBusy isSpecial isApple isAppleBootstrap isWholedisk isFat_or_NTFS + isEmpty isExtended isTrueLocalFS isTrueFS isDos isSwap isOtherAvailableFS isRawLVM isRawRAID isRAID isLVM isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isLoopback isMounted isBusy isSpecial isApple isAppleBootstrap isWholedisk isFat_or_NTFS isRecovery maybeFormatted set_isFormatted ); @@ -323,6 +323,14 @@ sub isDos { arch() !~ /^sparc/ && ${{ 1 => 1, 4 => 1, 6 => 1 }}{$_[0]{pt_type}} sub isFat_or_NTFS { member($_[0]{fs_type}, 'vfat', 'ntfs', 'ntfs-3g') } sub isApple { $_[0]{pt_type} == 0x401 && defined $_[0]{isDriver} } sub isAppleBootstrap { $_[0]{pt_type} == 0x401 && defined $_[0]{isBoot} } +sub isRecovery { + isFat_or_NTFS($_[0]) && ($_[0]{type_name} eq 'Hidden' || + member($_[0]{device_LABEL} , + # Extracted from /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi + # Hopefuly we'll ask to hal/udev someday + 'RECOVERY', 'PQSERVICE', 'HP_RECOVERY', 'Recovery Partition', 'DellUtility', 'DellRestore', 'IBM_SERVICE', 'SERVICEV001', 'SERVICEV002') + ) +} sub isTrueFS { isTrueLocalFS($_[0]) || member($_[0]{fs_type}, qw(nfs)) } sub isTrueLocalFS { member($_[0]{fs_type}, true_local_fs_types()) } |