summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--perl-install/fs.pm2
-rw-r--r--perl-install/partition_table.pm6
2 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index f20aaf849..8f7b45809 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -240,7 +240,7 @@ sub prepare_write_fstab {
}
}
- my $type = type2fs($_);
+ my $type = type2fs($_, 'auto');
my $dev =
$_->{device_LABEL} ? $_->{device_LABEL} :
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 {