summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/fs/type.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm
index ed6b4a571..a858556a6 100644
--- a/perl-install/fs/type.pm
+++ b/perl-install/fs/type.pm
@@ -343,7 +343,12 @@ sub isSpecial { isRAID($_[0]) || isLVM($_[0]) || isLoopback($_[0]) || isUBD($_[0
sub can_be_this_fs_type {
my ($part, $fs_type) = @_;
- $part->{fs_type} && ($part->{fs_type} eq 'auto' || member($fs_type, split(':', $part->{fs_type})));
+ can_be_one_of_those_fs_types($part, $fs_type);
+}
+sub can_be_one_of_those_fs_types {
+ my ($part, @fs_types) = @_;
+ $part->{fs_type} or return;
+ $part->{fs_type} eq 'auto' || listlength(intersection(\@fs_types, [ split(':', $part->{fs_type}) ]));
}
sub maybeFormatted {