Patchwork [24/26] linux-aio: Fix typo in read() EINTR check

login
register
mail settings
Submitter Kevin Wolf
Date April 23, 2010, 3:30 p.m.
Message ID <1272036658-26776-25-git-send-email-kwolf@redhat.com>
Download mbox | patch
Permalink /patch/50841/
State New
Headers show

Comments

Kevin Wolf - April 23, 2010, 3:30 p.m.
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 linux-aio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/linux-aio.c b/linux-aio.c
index 5e892b0..68f4b3d 100644
--- a/linux-aio.c
+++ b/linux-aio.c
@@ -123,7 +123,7 @@  static void qemu_laio_completion_cb(void *opaque)
 
         do {
             ret = read(s->efd, &val, sizeof(val));
-        } while (ret == 1 && errno == EINTR);
+        } while (ret == -1 && errno == EINTR);
 
         if (ret == -1 && errno == EAGAIN)
             break;