From: Ray Strode Date: Wed, 4 Apr 2012 15:28:26 +0000 (-0400) Subject: main: fix inverted conditional in active console reading code X-Git-Tag: 0.8.5~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=990f332b3ff172e02c8defefdd1775470fccb90f;p=thirdparty%2Fplymouth.git 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. --- 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);