diff options
author | Anssi Hannula <anssi@mandriva.org> | 2010-01-03 10:11:44 +0000 |
---|---|---|
committer | Anssi Hannula <anssi@mandriva.org> | 2010-01-03 10:11:44 +0000 |
commit | 165d2d9586ac8ad6aada7880160e1816b00dd2cc (patch) | |
tree | 74c9d1ddb9e36401da134d4d5d90ccb35fbcb16c | |
parent | aded2595d4b586cc27185706ae1881234072c23f (diff) | |
download | monitor-edid-165d2d9586ac8ad6aada7880160e1816b00dd2cc.tar monitor-edid-165d2d9586ac8ad6aada7880160e1816b00dd2cc.tar.gz monitor-edid-165d2d9586ac8ad6aada7880160e1816b00dd2cc.tar.bz2 monitor-edid-165d2d9586ac8ad6aada7880160e1816b00dd2cc.tar.xz monitor-edid-165d2d9586ac8ad6aada7880160e1816b00dd2cc.zip |
monitor-edid:
add --first support for stopping processing after one EDID has been
found
-rw-r--r-- | NEWS | 4 | ||||
-rwxr-xr-x | monitor-edid | 7 |
2 files changed, 8 insertions, 3 deletions
@@ -33,6 +33,10 @@ multiple methods o allow retrieval of multiple EDIDs via VBE +- monitor-edid: + o add --first support for stopping processing after one EDID has been + found + Version 2.5 - 18 October 2009, by Anssi Hannula - monitor-probe-using-X: diff --git a/monitor-edid b/monitor-edid index 4133082..a59226f 100755 --- a/monitor-edid +++ b/monitor-edid @@ -32,12 +32,12 @@ if ($0 =~ /monitor-get-edid/) { exit 1; } } else { - GetOptions_(@common_options, 'MonitorsDB', 'perl') - or die "usage: monitor-edid $common_options_usage [--perl] [--MonitorsDB]\n"; + GetOptions_(@common_options, 'first', 'MonitorsDB', 'perl') + or die "usage: monitor-edid $common_options_usage [--first] [--perl] [--MonitorsDB]\n"; my $err = 1; - if (my @edids = get_edids()) { + if (my @edids = get_edids($opt{first})) { print "(\n" if $opt{perl}; foreach (@edids) { my ($f, $edid) = @$_; @@ -99,6 +99,7 @@ sub get_edids { next if grep { $_->[1] eq $edid } @l; push @l, [ "vbe$port" => $edid ]; + last if $b_get_first; } } } |