From f97dbb043f3d4709c32b259b180d5121fb6e399a Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Sun, 3 Jan 2010 10:55:24 +0000 Subject: monitor-get-edid-using-vbe: never retry in console mode if the card reports that the port does not support DDC (usually this means that the port has no display devices connected) --- monitor-get-edid-using-vbe.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'monitor-get-edid-using-vbe.c') diff --git a/monitor-get-edid-using-vbe.c b/monitor-get-edid-using-vbe.c index abd9e9a..0ba76dd 100644 --- a/monitor-get-edid-using-vbe.c +++ b/monitor-get-edid-using-vbe.c @@ -37,7 +37,7 @@ int main(int argc, char **argv) int size = get_edid(edid, port, skip_vbe_check); - if (size <= 0 && try_in_console) { + if (size < 0 && try_in_console) { int non_X_console = 1; struct vt_stat current; int fd = open("/dev/console", O_RDWR); @@ -57,13 +57,13 @@ int main(int argc, char **argv) close(fd); } - if (size > 0) { + if (size >= 0) { write(1, edid, size); return 0; } - /* return 1 when VBE call was ok but not EDID call; + /* returns 1 when VBE call was ok but not EDID call; * calling program can then speedup call on other ports with --skip-vbe-check; * also, calling program knows no ports work if the VBE call failed */ - return size < 0 ? 2 : 1; + return -size; } -- cgit v1.2.1