linux-aio: Fix typo in read() EINTR check

Submitted by Stefan Hajnoczi on April 14, 2010, 11:13 a.m.

Details

Message ID 1271243616-8569-1-git-send-email-stefanha@linux.vnet.ibm.com
State New
Headers show

Commit Message

Stefan Hajnoczi April 14, 2010, 11:13 a.m.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 linux-aio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Kevin Wolf April 14, 2010, 3:54 p.m.
Am 14.04.2010 13:13, schrieb Stefan Hajnoczi:
> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
> ---

Thanks, applied to the block branch.

Kevin

Patch hide | download patch | download mbox

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;