diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-03-24 06:29:49 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-03-24 06:29:49 +0000 |
commit | 84071688ab52d6af5cff69229d146342ae444941 (patch) | |
tree | 6a9e77d98d6189a0bc8112ed78f13cb57f795062 /lib | |
parent | 4b002564716195df76fb0de1fc264c4765d7866e (diff) | |
download | drakx-kbd-mouse-x11-84071688ab52d6af5cff69229d146342ae444941.tar drakx-kbd-mouse-x11-84071688ab52d6af5cff69229d146342ae444941.tar.gz drakx-kbd-mouse-x11-84071688ab52d6af5cff69229d146342ae444941.tar.bz2 drakx-kbd-mouse-x11-84071688ab52d6af5cff69229d146342ae444941.tar.xz drakx-kbd-mouse-x11-84071688ab52d6af5cff69229d146342ae444941.zip |
perl_checker cleanups
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Xconfig/card.pm | 2 | ||||
-rw-r--r-- | lib/Xconfig/default.pm | 1 | ||||
-rw-r--r-- | lib/Xconfig/main.pm | 4 | ||||
-rw-r--r-- | lib/Xconfig/monitor.pm | 4 | ||||
-rw-r--r-- | lib/Xconfig/various.pm | 14 |
5 files changed, 12 insertions, 13 deletions
diff --git a/lib/Xconfig/card.pm b/lib/Xconfig/card.pm index 30a5929..0eab464 100644 --- a/lib/Xconfig/card.pm +++ b/lib/Xconfig/card.pm @@ -113,7 +113,7 @@ sub probe() { #dual head ATI card have a dummy DISPLAY_OTHER pci device because it #was needed by Win2000, filter those out because we don't want to #behave as if there were 2 video cards in the system in such cases - $_->{media_type} eq 'DISPLAY_VGA' ? $card : (); + if_($_->{media_type} eq 'DISPLAY_VGA', $card); } @c; if (@cards >= 2 && $cards[0]{card_name} eq $cards[1]{card_name} && $cards[0]{card_name} eq 'Intel 830 - 965') { diff --git a/lib/Xconfig/default.pm b/lib/Xconfig/default.pm index f0826bc..586e4a4 100644 --- a/lib/Xconfig/default.pm +++ b/lib/Xconfig/default.pm @@ -13,7 +13,6 @@ use modules::any_conf; sub configure { my ($do_pkgs, $o_keyboard, $o_mouse) = @_; - my $keyboard = $o_keyboard || keyboard::read_or_default(); my $mouse = $o_mouse || do { my $mouse = mouse::read(); add2hash($mouse, mouse::detect(modules::any_conf->read)) if !$::noauto; diff --git a/lib/Xconfig/main.pm b/lib/Xconfig/main.pm index d92c27f..55d88ba 100644 --- a/lib/Xconfig/main.pm +++ b/lib/Xconfig/main.pm @@ -55,7 +55,7 @@ sub configure_everything_auto_install { #- still try to configure screen and resolution (to set default background) #- if card configuration failed (for example if best driver is not available) - $X->{resolutions} = Xconfig::resolution_and_depth::configure_auto_install($raw_X, $X->{card} ||{}, $X->{monitors}, $old_X); + $X->{resolutions} = Xconfig::resolution_and_depth::configure_auto_install($raw_X, $X->{card} || {}, $X->{monitors}, $old_X); return if !$configured; my $action = &write($raw_X, $X, $options->{skip_fb_setup}); @@ -214,7 +214,7 @@ sub write { Xconfig::various::check_xorg_conf_symlink(); Xconfig::various::setup_kms(); if ($X->{resolutions}[0]{bios}) { - Xconfig::various::setupFB($X->{resolutions}[0]{bios}) if !$o_skip_fb_setup;; + Xconfig::various::setupFB($X->{resolutions}[0]{bios}) if !$o_skip_fb_setup; 'need_reboot'; } elsif (my $resolution = $only_resolution && eval { $raw_X->get_resolution }) { 'need_xrandr' . sprintf(' --size %dx%d', @$resolution{'X', 'Y'}); diff --git a/lib/Xconfig/monitor.pm b/lib/Xconfig/monitor.pm index 857ac01..2622057 100644 --- a/lib/Xconfig/monitor.pm +++ b/lib/Xconfig/monitor.pm @@ -19,7 +19,7 @@ sub good_default_monitor() { sub default_monitor { my ($card_Driver) = @_; - if (detect_devices::is_virtualbox() || detect_devices::isLaptop() || ($card_Driver eq 'siliconmotion' && arch() =~ /mips/)) { + if (detect_devices::is_virtualbox() || detect_devices::isLaptop() || $card_Driver eq 'siliconmotion' && arch() =~ /mips/) { # HACK: since there is no way to get the EDID on gdium, the resolution is passed to the kernel # so we can rely on it # in vbox, we return Plug'n'Play because the vbox integration addons @@ -213,7 +213,7 @@ sub is_valid { $monitor->{HorizSync} && $monitor->{VertRefresh} || $monitor->{VendorName} eq "Plug'n Play"; } -sub probe { +sub probe() { probe_DDC() || probe_DMI(); } diff --git a/lib/Xconfig/various.pm b/lib/Xconfig/various.pm index 88df792..8d25375 100644 --- a/lib/Xconfig/various.pm +++ b/lib/Xconfig/various.pm @@ -114,7 +114,7 @@ sub config { my ($raw_X, $card, $various) = @_; if (exists $various->{DontZap}) { - configure_ServerFlag($raw_X, 'DontZap', $various->{DontZap} eq 1 ? 'True' : 'False'); + configure_ServerFlag($raw_X, 'DontZap', $various->{DontZap} == 1 ? 'True' : 'False'); } if ($various->{Composite}) { $raw_X->remove_extension('Composite'); @@ -339,15 +339,15 @@ sub configure_FB_TVOUT { } sub configure_ServerFlag { - my ($raw_X, $option, $value) = @_; + my ($raw_X, $option, $o_value) = @_; my $ServerFlags = $raw_X->get_Section('ServerFlags'); - my $option_ref = $ServerFlags->{$option}->[0]; - if ($value) { - $option_ref->{val} = $value; + my $option_ref = $ServerFlags->{$option}[0]; + if ($o_value) { + $option_ref->{val} = $o_value; $option_ref->{commented} = 0; $option_ref->{Option} = 1; } - return undef if $option_ref->{commented} eq 1; + return undef if $option_ref->{commented} == 1; $option_ref->{val}; } @@ -399,7 +399,7 @@ sub setupFB { }, $bios_vga_mode); } -sub setup_kms { +sub setup_kms() { change_bootloader_config( sub { my ($bootloader) = @_; |