summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-06 12:20:23 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-06 12:20:23 +0000
commitc13a864115fc2b5630706ee8e70d51597705ede2 (patch)
tree8f1440f482b866b39a77e98e6ced5688b1a17e54 /perl-install/fsedit.pm
parent08f790571751b74fdcb6dc44440fe0ab873a97f2 (diff)
downloaddrakx-c13a864115fc2b5630706ee8e70d51597705ede2.tar
drakx-c13a864115fc2b5630706ee8e70d51597705ede2.tar.gz
drakx-c13a864115fc2b5630706ee8e70d51597705ede2.tar.bz2
drakx-c13a864115fc2b5630706ee8e70d51597705ede2.tar.xz
drakx-c13a864115fc2b5630706ee8e70d51597705ede2.zip
(package_needed_for_partition_type): return the package needed for a partition type
(check_type): cleanup
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 9856e7fdb..f237a8a8c 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -464,8 +464,18 @@ sub get_root { &get_root_ || {} }
#- do this before modifying $part->{type}
sub check_type {
my ($type, $hd, $part) = @_;
- isThisFs("jfs", { type => name2type($type) }) && $part->{size} < 16 << 11 and die _("You can't use JFS for partitions smaller than 16MB");
- isThisFs("reiserfs", { type => name2type($type) }) && $part->{size} < 32 << 11 and die _("You can't use ReiserFS for partitions smaller than 32MB");
+ isThisFs("jfs", { type => $type }) && $part->{size} < 16 << 11 and die _("You can't use JFS for partitions smaller than 16MB");
+ isThisFs("reiserfs", { type => $type }) && $part->{size} < 32 << 11 and die _("You can't use ReiserFS for partitions smaller than 32MB");
+}
+
+sub package_needed_for_partition_type {
+ my ($part) = @_;
+ my %l = (
+ reiserfs => 'reiserfsprogs',
+ xfs => 'xfsprogs',
+ jfs => 'jfsprogs',
+ );
+ $l{type2fs($part)};
}
#- do this before modifying $part->{mntpoint}