From 990f332b3ff172e02c8defefdd1775470fccb90f Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 4 Apr 2012 11:28:26 -0400 Subject: [PATCH] main: fix inverted conditional in active console reading code We were failing when read succeeded, not when it failed, so we were always reverting to fallback. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 095f5357..5a2f8b18 100644 --- a/src/main.c +++ b/src/main.c @@ -1892,7 +1892,7 @@ add_consoles_from_file (state_t *state, } ply_trace ("reading file"); - if (read (fd, contents, sizeof (contents))) + if (read (fd, contents, sizeof (contents)) <= 0) { ply_trace ("couldn't read it: %m"); close (fd);