aboutsummaryrefslogtreecommitdiffstats
path: root/monitor-parse-edid
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-01-08 17:36:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-01-08 17:36:20 +0000
commitde65af7dfd6ea18cef10245dce7459de17c2f958 (patch)
treec48cd6e616af1a3a9c069bc698f2969557213bdf /monitor-parse-edid
parentfd3d9da13e4543af929fdfe4eb6af968b9747640 (diff)
downloadmonitor-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
Diffstat (limited to 'monitor-parse-edid')
-rwxr-xr-xmonitor-parse-edid8
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)) {