From c1bb8da243e4443c9134a14e4230a8e8f449ee55 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 1 Feb 2010 15:04:07 +0000 Subject: (_ask_mbr_or_not) extract it out of setupBootloader__mbr_or_not() --- perl-install/any.pm | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'perl-install') diff --git a/perl-install/any.pm b/perl-install/any.pm index f02a0b4d4..55d13d17b 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -326,6 +326,19 @@ On which drive are you booting?"), \&partition_table::description, $hds) or retu 1; } +sub _ask_mbr_or_not { + my ($in, $default, @l) = @_; + $in->ask_from_({ title => N("Bootloader Installation"), + interactive_help_id => 'setupBootloaderBeginner', + }, + [ + { label => N("Where do you want to install the bootloader?"), title => 1 }, + { val => \$default, list => \@l, format => sub { $_[0][0] }, type => 'list' }, + ] + ); + $default; +} + sub setupBootloader__mbr_or_not { my ($in, $b, $hds, $fstab) = @_; @@ -355,14 +368,7 @@ sub setupBootloader__mbr_or_not { ); my $default = find { $_->[1] eq $b->{boot} } @l; - $in->ask_from_({ title => N("Bootloader Installation"), - interactive_help_id => 'setupBootloaderBeginner', - }, - [ - { label => N("Where do you want to install the bootloader?"), title => 1 }, - { val => \$default, list => \@l, format => sub { $_[0][0] }, type => 'list' }, - ] - ); + $default = _ask_mbr_or_not($in, $default, @l); my $new_boot = $default->[1]; #- remove bios mapping if the user changed the boot device -- cgit v1.2.1