aboutsummaryrefslogtreecommitdiffstats
path: root/monitor-parse-edid
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-04-01 23:20:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-04-01 23:20:46 +0000
commit887fc651929857ef5eee5058f4fb9a162f48a502 (patch)
tree04eb4d74eef6d37d81a3cc73dec8a37b6c489bcd /monitor-parse-edid
parent6281c54d8011520e2299332e16e80d31cb62e271 (diff)
downloadmonitor-edid-887fc651929857ef5eee5058f4fb9a162f48a502.tar
monitor-edid-887fc651929857ef5eee5058f4fb9a162f48a502.tar.gz
monitor-edid-887fc651929857ef5eee5058f4fb9a162f48a502.tar.bz2
monitor-edid-887fc651929857ef5eee5058f4fb9a162f48a502.tar.xz
monitor-edid-887fc651929857ef5eee5058f4fb9a162f48a502.zip
display a warning for unrecognised EDID flags in verbose mode
Diffstat (limited to 'monitor-parse-edid')
-rwxr-xr-xmonitor-parse-edid7
1 files changed, 4 insertions, 3 deletions
diff --git a/monitor-parse-edid b/monitor-parse-edid
index f5bb960..4d40970 100755
--- a/monitor-parse-edid
+++ b/monitor-parse-edid
@@ -171,7 +171,7 @@ sub check_parsed_edid {
}
sub parse_edid {
- my ($raw_edid) = @_;
+ my ($raw_edid, $verbose) = @_;
my %edid;
my @vals = unpack(join('', map { $_->[0] } @edid_info), $raw_edid);
@@ -273,7 +273,8 @@ sub parse_edid {
} elsif ($flag == 0xff) {
push @{$edid{serial_number2}}, unpack('A13', $vv);
} else {
- #warn "parse_edid: unknown flag $flag\n";
+ $verbose && $vv ne "\0" x 13 && $vv ne " " x 13 and
+ warn "parse_edid: unknown flag $flag\n";
}
}
}
@@ -470,7 +471,7 @@ sub error {
length($raw_edid) == 128 || length($raw_edid) == 256 or error("bad edid");
-my $edid = parse_edid($raw_edid);
+my $edid = parse_edid($raw_edid, $verbose);
if (my $err = check_parsed_edid($edid)) {
die "$err\n";
}