[PATCH 20/27] edid-decode: return 1 if no edid was found

Hans Verkuil hverkuil at xs4all.nl
Thu Aug 31 11:41:13 UTC 2017


From: Hans Verkuil <hansverk at cisco.com>

Commit e12845d9 accidentally commented out the return 1 when no edid was found.

Uncomment it and also use stderr for the error message.

Signed-off-by: Hans Verkuil <hansverk at cisco.com>
---
 edid-decode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/edid-decode.c b/edid-decode.c
index 660ae7a9..58dc1c13 100644
--- a/edid-decode.c
+++ b/edid-decode.c
@@ -2153,8 +2153,8 @@ int main(int argc, char **argv)
     dump_breakdown(edid);
 
     if (!edid || memcmp(edid, "\x00\xFF\xFF\xFF\xFF\xFF\xFF\x00", 8)) {
-	printf("No header found\n");
-	// return 1;
+	fprintf(stderr, "No header found\n");
+	return 1;
     }
 
     printf("EDID version: %hd.%hd\n", edid[0x12], edid[0x13]);
-- 
2.14.1



More information about the xorg-devel mailing list