]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Make ply_fd_has_data return false on hangups
authorRay Strode <rstrode@redhat.com>
Wed, 16 May 2007 21:43:20 +0000 (17:43 -0400)
committerRay Strode <rstrode@redhat.com>
Wed, 16 May 2007 21:43:20 +0000 (17:43 -0400)
src/ply-utils.c

index b793c614f2a0291d4d9254724d5cda2991b2dd99..4605114ba27d7d31d06b3df960a0bced30486e67 100644 (file)
@@ -83,7 +83,9 @@ ply_fd_has_data (int fd)
   poll_data.revents = 0;
   result = poll (&poll_data, 1, 10);
 
-  return result == 1;
+  return result == 1 
+         && ((poll_data.revents & POLLIN) 
+         || (poll_data.revents & POLLPRI));
 }
 
 bool