summaryrefslogtreecommitdiffstats
path: root/perl-install/fs
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/fs')
-rw-r--r--perl-install/fs/get.pm4
-rw-r--r--perl-install/fs/type.pm3
2 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/fs/get.pm b/perl-install/fs/get.pm
index 859ddf0ac..6b982c1e9 100644
--- a/perl-install/fs/get.pm
+++ b/perl-install/fs/get.pm
@@ -30,10 +30,10 @@ sub fstab_and_holes {
sub holes {
my ($all_hds) = @_;
- grep { $_->{pt_type} == 0 } fstab_and_holes($all_hds);
+ grep { isEmpty($_) } fstab_and_holes($all_hds);
}
sub hds_holes {
- grep { $_->{pt_type} == 0 } hds_fstab_and_holes(@_);
+ grep { isEmpty($_) } hds_fstab_and_holes(@_);
}
sub free_space {
my ($all_hds) = @_;
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) }