diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-01-08 17:36:20 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-01-08 17:36:20 +0000 |
commit | de65af7dfd6ea18cef10245dce7459de17c2f958 (patch) | |
tree | c48cd6e616af1a3a9c069bc698f2969557213bdf | |
parent | fd3d9da13e4543af929fdfe4eb6af968b9747640 (diff) | |
download | monitor-edid-de65af7dfd6ea18cef10245dce7459de17c2f958.tar monitor-edid-de65af7dfd6ea18cef10245dce7459de17c2f958.tar.gz monitor-edid-de65af7dfd6ea18cef10245dce7459de17c2f958.tar.bz2 monitor-edid-de65af7dfd6ea18cef10245dce7459de17c2f958.tar.xz monitor-edid-de65af7dfd6ea18cef10245dce7459de17c2f958.zip |
- 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
-rw-r--r-- | NEWS | 3 | ||||
-rwxr-xr-x | monitor-parse-edid | 8 |
2 files changed, 10 insertions, 1 deletions
@@ -0,0 +1,3 @@ +- 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 diff --git a/monitor-parse-edid b/monitor-parse-edid index c542fe4..f5bb960 100755 --- a/monitor-parse-edid +++ b/monitor-parse-edid @@ -462,7 +462,13 @@ if (@ARGV == 0) { my $raw_edid = join('', <$F>); -length($raw_edid) == 128 || length($raw_edid) == 256 or die "monitor-parse-edid: bad edid\n"; +sub error { + my ($msg) = @_; + print STDERR ($file ? "$file: " : ''), $msg, "\n"; + exit 1; +} + +length($raw_edid) == 128 || length($raw_edid) == 256 or error("bad edid"); my $edid = parse_edid($raw_edid); if (my $err = check_parsed_edid($edid)) { |