From c13a864115fc2b5630706ee8e70d51597705ede2 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 6 Jul 2002 12:20:23 +0000 Subject: (package_needed_for_partition_type): return the package needed for a partition type (check_type): cleanup --- perl-install/fsedit.pm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'perl-install') 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} -- cgit v1.2.1