diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-01-23 16:41:42 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-01-23 16:41:42 +0000 |
commit | bd18cdd0b07c291c9b5bd7a852dd2024a286b910 (patch) | |
tree | c16eff8ff9312c95f7edbe2f3e2d6dc59e4ccd42 /perl-install/Xconfig/xfree.pm | |
parent | f277b072442439fa78f16f5fb75869793620e397 (diff) | |
download | drakx-backup-do-not-use-bd18cdd0b07c291c9b5bd7a852dd2024a286b910.tar drakx-backup-do-not-use-bd18cdd0b07c291c9b5bd7a852dd2024a286b910.tar.gz drakx-backup-do-not-use-bd18cdd0b07c291c9b5bd7a852dd2024a286b910.tar.bz2 drakx-backup-do-not-use-bd18cdd0b07c291c9b5bd7a852dd2024a286b910.tar.xz drakx-backup-do-not-use-bd18cdd0b07c291c9b5bd7a852dd2024a286b910.zip |
(is_fbdev): created
(get_both, set_both): skip modifications on missing xfree3 or xfree4
Diffstat (limited to 'perl-install/Xconfig/xfree.pm')
-rw-r--r-- | perl-install/Xconfig/xfree.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/perl-install/Xconfig/xfree.pm b/perl-install/Xconfig/xfree.pm index 89b06a61f..335187a2f 100644 --- a/perl-install/Xconfig/xfree.pm +++ b/perl-install/Xconfig/xfree.pm @@ -47,15 +47,17 @@ sub get_monitor { get_both('get_monitor', @_) } sub get_monitors { get_both('get_monitors', @_) } sub set_monitors { set_both('set_monitors', @_) } +sub is_fbdev { get_both('is_fbdev', @_) } + #-############################################################################## #- helpers #-############################################################################## sub get_both { my ($getter, $both) = @_; - if ($both->{xfree3}) { - $both->{xfree4}->$getter; - } elsif ($both->{xfree4}) { + if (is_empty_array_ref($both->{xfree3})) { + $both->{xfree3}->$getter; + } elsif (is_empty_array_ref($both->{xfree4})) { $both->{xfree3}->$getter; } else { my @l3 = $both->{xfree3}->$getter; @@ -66,8 +68,8 @@ sub get_both { sub set_both { my ($setter, $both, @l) = @_; - $both->{xfree3}->$setter(@l) if $both->{xfree3}; - $both->{xfree4}->$setter(@l) if $both->{xfree4}; + $both->{xfree3}->$setter(@l) if !is_empty_array_ref($both->{xfree3}); + $both->{xfree4}->$setter(@l) if !is_empty_array_ref($both->{xfree4}); } sub merge_values { |