summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/fs/type.pm10
1 files changed, 5 insertions, 5 deletions
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}");
}