summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mageia.org>2011-04-17 14:01:53 +0000
committerAnssi Hannula <anssi@mageia.org>2011-04-17 14:01:53 +0000
commitf2771a7825bdbc12bfc0ab7ea0aeb89cb5c72d15 (patch)
treeb2dae0ce2f6255a4aa787800f0230d9d5dd9f9fc /lib
parent2b19dbf121a6e19d02182f424e21d28d924ad55e (diff)
downloaddrakx-kbd-mouse-x11-f2771a7825bdbc12bfc0ab7ea0aeb89cb5c72d15.tar
drakx-kbd-mouse-x11-f2771a7825bdbc12bfc0ab7ea0aeb89cb5c72d15.tar.gz
drakx-kbd-mouse-x11-f2771a7825bdbc12bfc0ab7ea0aeb89cb5c72d15.tar.bz2
drakx-kbd-mouse-x11-f2771a7825bdbc12bfc0ab7ea0aeb89cb5c72d15.tar.xz
drakx-kbd-mouse-x11-f2771a7825bdbc12bfc0ab7ea0aeb89cb5c72d15.zip
Factorize change_bootloader_config for next commit.
Diffstat (limited to 'lib')
-rw-r--r--lib/Xconfig/various.pm24
1 files changed, 18 insertions, 6 deletions
diff --git a/lib/Xconfig/various.pm b/lib/Xconfig/various.pm
index 59cf92b..516bd12 100644
--- a/lib/Xconfig/various.pm
+++ b/lib/Xconfig/various.pm
@@ -353,8 +353,8 @@ sub check_xorg_conf_symlink() {
}
}
-sub setupFB {
- my ($bios_vga_mode) = @_;
+sub change_bootloader_config {
+ my ($do, @do_params) = @_;
require bootloader;
my ($bootloader, $all_hds);
@@ -372,13 +372,25 @@ sub setupFB {
$bootloader = bootloader::read($all_hds) or return;
}
- foreach (@{$bootloader->{entries}}) {
- $_->{vga} = $bios_vga_mode if $_->{vga}; #- replace existing vga= with
- }
+ $do->($bootloader, @do_params) or return;
- bootloader::update_splash($bootloader);
bootloader::action($bootloader, 'write', $all_hds);
bootloader::action($bootloader, 'when_config_changed');
+ 1;
+}
+
+sub setupFB {
+ my ($bios_vga_mode) = @_;
+
+ change_bootloader_config(
+ sub {
+ my ($bootloader, $bios_vga_mode) = @_;
+ foreach (@{$bootloader->{entries}}) {
+ $_->{vga} = $bios_vga_mode if $_->{vga}; #- replace existing vga= with
+ }
+ bootloader::update_splash($bootloader);
+ 1;
+ }, $bios_vga_mode);
}
1;