From bcc4607d0b19cd7f9abf7027f44356fe86de267d Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sun, 19 Aug 2001 21:27:10 +0000 Subject: simplify --- perl-install/install_steps_interactive.pm | 10 ++-------- perl-install/lang.pm | 5 +---- 2 files changed, 3 insertions(+), 12 deletions(-) (limited to 'perl-install') diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index dcbd19c7b..77691020c 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -393,12 +393,6 @@ sub choosePartitionsToFormat { return if @l == 0 || !$::expert && 0 == grep { ! $_->{toFormat} } @l; - my $name2label = sub { - sprintf("%s %s", - isSwap($_) ? type2name($_->{type}) : $_->{mntpoint}, - partition_table::description($_)); - }; - #- keep it temporary until the guy has accepted $_->{toFormatTmp} = $_->{toFormat} || $_->{toFormatUnsure} foreach @l; @@ -409,10 +403,10 @@ sub choosePartitionsToFormat { [ map { my $e = $_; ({ - text => $name2label->($e), type => 'bool', + text => partition_table::description($e), type => 'bool', val => \$e->{toFormatTmp} }, if_(!isLoopback($_) && !isThisFs("reiserfs", $_), { - text => $name2label->($e), type => 'bool', advanced => 1, + text => partition_table::description($e), type => 'bool', advanced => 1, disabled => sub { !$e->{toFormatTmp} }, val => \$e->{toFormatCheck} })) } @l ] diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 5ca877661..053e7048c 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -503,10 +503,7 @@ sub fs_options { my $l = $languages{$lang} or return; my $c = $charsets{$l->[1]} or return; my ($iocharset, $codepage) = @$c[3..4]; - +{ - if_($iocharset, iocharset => $iocharset), - if_($codepage, codepage => $codepage), - }; + $iocharset, $codepage; } sub charset { -- cgit v1.2.1