From 5faf12bcb1a086ad7c27a9f431ac5022c94a2888 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 3 Jan 2005 15:32:55 +0000 Subject: create can_be_one_of_those_fs_types() --- perl-install/fs/type.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'perl-install/fs/type.pm') 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 { -- cgit v1.2.1