summaryrefslogtreecommitdiffstats
path: root/perl-install/fs/type.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-11-16 10:14:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-11-16 10:14:11 +0000
commitbfcc35f8882cb0fbd5c965a43ccd8103e38ed5e6 (patch)
tree29fc62cbe16571e39431bc6b6eca9a6143e699fe /perl-install/fs/type.pm
parent81966041225bbca4aae4acf0cf141645dffedc03 (diff)
downloaddrakx-backup-do-not-use-bfcc35f8882cb0fbd5c965a43ccd8103e38ed5e6.tar
drakx-backup-do-not-use-bfcc35f8882cb0fbd5c965a43ccd8103e38ed5e6.tar.gz
drakx-backup-do-not-use-bfcc35f8882cb0fbd5c965a43ccd8103e38ed5e6.tar.bz2
drakx-backup-do-not-use-bfcc35f8882cb0fbd5c965a43ccd8103e38ed5e6.tar.xz
drakx-backup-do-not-use-bfcc35f8882cb0fbd5c965a43ccd8103e38ed5e6.zip
create isEmpty() and use it instead of simply testing {pt_type}, since {pt_type} can be undef whereas {fs_type} is set
Diffstat (limited to 'perl-install/fs/type.pm')
-rw-r--r--perl-install/fs/type.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm
index f9ff8f618..bca5d8f5a 100644
--- a/perl-install/fs/type.pm
+++ b/perl-install/fs/type.pm
@@ -8,7 +8,7 @@ use common;
our @ISA = qw(Exporter);
our @EXPORT = qw(
- isExtended isTrueLocalFS isTrueFS isDos isSwap isSunOS isOtherAvailableFS isRawLVM isRawRAID isRAID isLVM isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isLoopback isMounted isBusy isSpecial isApple isAppleBootstrap isWholedisk isHiddenMacPart isFat_or_NTFS
+ isEmpty isExtended isTrueLocalFS isTrueFS isDos isSwap isSunOS isOtherAvailableFS isRawLVM isRawRAID isRAID isLVM isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isLoopback isMounted isBusy isSpecial isApple isAppleBootstrap isWholedisk isHiddenMacPart isFat_or_NTFS
maybeFormatted set_isFormatted
);
@@ -307,6 +307,7 @@ sub type_subpart_from_magic {
}
+sub isEmpty { !$_[0]{fs_type} && $_[0]{pt_type} == 0 }
sub isEfi { arch() =~ /ia64/ && $_[0]{pt_type} == 0xef }
sub isWholedisk { arch() =~ /^sparc/ && $_[0]{pt_type} == 5 }
sub isExtended { arch() !~ /^sparc/ && ($_[0]{pt_type} == 5 || $_[0]{pt_type} == 0xf || $_[0]{pt_type} == 0x85) }