diff options
-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)) { |