diff options
author | Max Reitz <mreitz@redhat.com> | 2015-02-25 13:08:28 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-03-18 12:07:21 +0100 |
commit | 4adf4180f284caf4ea9cd83ce37085d50a52603b (patch) | |
tree | 9104999ed7ffeaea0214628ac4d505db5c3fbc94 /qemu-coroutine-io.c | |
parent | 0379f474ddebfc69f42fa8231d86687cf29d997b (diff) | |
download | qemu-4adf4180f284caf4ea9cd83ce37085d50a52603b.tar.gz qemu-4adf4180f284caf4ea9cd83ce37085d50a52603b.tar.bz2 qemu-4adf4180f284caf4ea9cd83ce37085d50a52603b.zip |
coroutine-io: Return -errno in case of error
In case qemu_co_sendv_recvv() fails without any data read, there is no
reason not to return the perfectly fine error number retrieved from
socket_error().
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-16-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-coroutine-io.c')
-rw-r--r-- | qemu-coroutine-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-coroutine-io.c b/qemu-coroutine-io.c index d4049260da..28dc7351ac 100644 --- a/qemu-coroutine-io.c +++ b/qemu-coroutine-io.c @@ -45,7 +45,7 @@ qemu_co_sendv_recvv(int sockfd, struct iovec *iov, unsigned iov_cnt, if (err == EAGAIN || err == EWOULDBLOCK) { qemu_coroutine_yield(); } else if (done == 0) { - return -1; + return -err; } else { break; } |