diff options
Diffstat (limited to 'monitor-get-edid-using-vbe.c')
-rw-r--r-- | monitor-get-edid-using-vbe.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |