diff options
Diffstat (limited to 'monitor-parse-edid')
-rwxr-xr-x | monitor-parse-edid | 8 |
1 files changed, 7 insertions, 1 deletions
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)) { |