diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-01-03 15:32:55 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-01-03 15:32:55 +0000 |
commit | 5faf12bcb1a086ad7c27a9f431ac5022c94a2888 (patch) | |
tree | 25e565baadf02145810f49a25af73122f84bd8e2 | |
parent | 9abe992851c315c0d98cceba797d0c9998e4300d (diff) | |
download | drakx-5faf12bcb1a086ad7c27a9f431ac5022c94a2888.tar drakx-5faf12bcb1a086ad7c27a9f431ac5022c94a2888.tar.gz drakx-5faf12bcb1a086ad7c27a9f431ac5022c94a2888.tar.bz2 drakx-5faf12bcb1a086ad7c27a9f431ac5022c94a2888.tar.xz drakx-5faf12bcb1a086ad7c27a9f431ac5022c94a2888.zip |
create can_be_one_of_those_fs_types()
-rw-r--r-- | perl-install/fs/type.pm | 7 |
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 { |