From cdf1741197fb5c0376400362e5200838493ad14f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 10 Aug 2004 10:05:04 +0000 Subject: when there is no {pt_type}, favour the one fs_type2pt_type favours --- perl-install/fs/type.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'perl-install') diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm index e2b484647..6eb7e6c12 100644 --- a/perl-install/fs/type.pm +++ b/perl-install/fs/type.pm @@ -193,13 +193,13 @@ sub type_name2subpart { sub part2type_name { my ($part) = @_; my @names = keys %type_name2fs_type; - if (exists $part->{pt_type}) { - @names = grep { $part->{pt_type} eq $type_name2pt_type{$_} } @names; + + if (my $pt_type = $part->{pt_type} || $part->{fs_type} && $fs_type2pt_type{$part->{fs_type}}) { + @names = grep { $pt_type eq $type_name2pt_type{$_} } @names; } - if ($part->{fs_type}) { - @names = grep { $part->{fs_type} eq $type_name2fs_type{$_} } @names; + if (my $fs_type = $part->{fs_type} || $part->{pt_type} && $pt_type2fs_type{$part->{pt_type}}) { + @names = grep { $fs_type eq $type_name2fs_type{$_} } @names; } - if (@names > 1) { log::l("ERROR: (part2type_name) multiple match for $part->{pt_type} $part->{fs_type}"); } -- cgit v1.2.1