diff options
author | Anssi Hannula <anssi@mandriva.org> | 2010-01-03 10:55:24 +0000 |
---|---|---|
committer | Anssi Hannula <anssi@mandriva.org> | 2010-01-03 10:55:24 +0000 |
commit | f97dbb043f3d4709c32b259b180d5121fb6e399a (patch) | |
tree | c5e5d228fc49962c8b14f889ee91b08cce09a28a /monitor-get-edid-using-vbe.c | |
parent | e7a9275adee8532d7185996e50a3b8d8d1ffcd81 (diff) | |
download | monitor-edid-f97dbb043f3d4709c32b259b180d5121fb6e399a.tar monitor-edid-f97dbb043f3d4709c32b259b180d5121fb6e399a.tar.gz monitor-edid-f97dbb043f3d4709c32b259b180d5121fb6e399a.tar.bz2 monitor-edid-f97dbb043f3d4709c32b259b180d5121fb6e399a.tar.xz monitor-edid-f97dbb043f3d4709c32b259b180d5121fb6e399a.zip |
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)
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; } |