summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-09-17 11:29:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-09-17 11:29:16 +0000
commit21e28d189899b6870fa2f7b5f08be47846db7f90 (patch)
tree1c56cc65334ab72762b5b5da21aabac1470d4fc8 /perl-install/partition_table.pm
parentad78b8e39cf20d8962eb1b594844d6c36df8bf53 (diff)
downloaddrakx-21e28d189899b6870fa2f7b5f08be47846db7f90.tar
drakx-21e28d189899b6870fa2f7b5f08be47846db7f90.tar.gz
drakx-21e28d189899b6870fa2f7b5f08be47846db7f90.tar.bz2
drakx-21e28d189899b6870fa2f7b5f08be47846db7f90.tar.xz
drakx-21e28d189899b6870fa2f7b5f08be47846db7f90.zip
ensure that a number is not written as the type in fstab
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index ef9e29038..a4120d0bb 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -226,7 +226,11 @@ sub important_types() {
difference2(\@l, \@bad_types);
}
-sub type2fs { $type2fs{$_[0]{type}} || $_[0]{type} }
+sub type2fs {
+ my ($part, $o_default) = @_;
+ my $type = $part->{type};
+ $type2fs{$type} || $type =~ /^(\d+)$/ && $o_default || $type;
+}
sub fs2type { $fs2type{$_[0]} || $_[0] }
sub type2name { $types{$_[0]} || $_[0] }
sub name2type {