diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-01-08 17:44:47 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-01-08 17:44:47 +0000 |
commit | 957050b286bc1784110a881c93b0fe7e24e7dc18 (patch) | |
tree | 9e61381e8ef60978d4839e9af6f5f714df1e875a | |
parent | de65af7dfd6ea18cef10245dce7459de17c2f958 (diff) | |
download | monitor-edid-957050b286bc1784110a881c93b0fe7e24e7dc18.tar monitor-edid-957050b286bc1784110a881c93b0fe7e24e7dc18.tar.gz monitor-edid-957050b286bc1784110a881c93b0fe7e24e7dc18.tar.bz2 monitor-edid-957050b286bc1784110a881c93b0fe7e24e7dc18.tar.xz monitor-edid-957050b286bc1784110a881c93b0fe7e24e7dc18.zip |
- monitor-get-edid: skip /proc/acpi/video/**/EDID files which can't be valid
(#34417)
(drop the monitor-parse-edid from NEWS since it's not that useful anymore
since monitor-edid will not give it EDID containing "<not supported>")
-rw-r--r-- | NEWS | 5 | ||||
-rwxr-xr-x | monitor-edid | 10 |
2 files changed, 11 insertions, 4 deletions
@@ -1,3 +1,2 @@ -- monitor-parse-edid: "<file name>: bad edid" so that monitor-edid trying to - parse "<not supported>" /proc/acpi/video/**/EDID files will give a more - understandable error message +- monitor-get-edid: skip /proc/acpi/video/**/EDID files which can't be valid + (#34417) diff --git a/monitor-edid b/monitor-edid index 1ba4d1c..8cbfb8d 100755 --- a/monitor-edid +++ b/monitor-edid @@ -61,7 +61,10 @@ sub parse_edid() { sub get_edids { my ($b_get_first) = @_; - my @l = map { my $s = slurp($_); $s ? [ $_ => $s ] : () } get_edid_files(); + my @l = map { + my $s = slurp($_); + is_edid_possibly_valid($s) ? [ $_ => $s ] : (); + } get_edid_files(); if (!@l || !$b_get_first && $< == 0) { if (my $cmd = get_using_vbe()) { @@ -95,6 +98,11 @@ sub find_EDID { @l; } +sub is_edid_possibly_valid { + my ($edid) = @_; + length($edid) >= 128; +} + sub slurp { my ($f) = @_; open(my $F, '<', $f) or return; |