[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/19] coroutine-io: Return -errno in case of error
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 13/19] coroutine-io: Return -errno in case of error |
Date: |
Wed, 18 Mar 2015 12:25:00 +0100 |
From: Max Reitz <address@hidden>
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 <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
qemu-coroutine-io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qemu-coroutine-io.c b/qemu-coroutine-io.c
index d404926..28dc735 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;
}
--
2.3.0
- [Qemu-devel] [PULL 06/19] nbd: Handle blk_getlength() failure, (continued)
- [Qemu-devel] [PULL 06/19] nbd: Handle blk_getlength() failure, Paolo Bonzini, 2015/03/18
- [Qemu-devel] [PULL 07/19] qemu-nbd: fork() can fail, Paolo Bonzini, 2015/03/18
- [Qemu-devel] [PULL 14/19] build: pass .d file name to scripts/make_device_config.sh, fix makefile target, Paolo Bonzini, 2015/03/18
- [Qemu-devel] [PULL 11/19] nbd: Fix interpretation of the export flags, Paolo Bonzini, 2015/03/18
- [Qemu-devel] [PULL 15/19] virtio-scsi: Fix assert in virtio_scsi_push_event, Paolo Bonzini, 2015/03/18
- [Qemu-devel] [PULL 12/19] nbd: Drop unexpected data for NBD_OPT_LIST, Paolo Bonzini, 2015/03/18
- [Qemu-devel] [PULL 18/19] virtio-scsi-dataplane: fix memory leak in virtio_scsi_vring_init, Paolo Bonzini, 2015/03/18
- [Qemu-devel] [PULL 19/19] exec: Respect as_tranlsate_internal length clamp, Paolo Bonzini, 2015/03/18
- [Qemu-devel] [PULL 16/19] kvm: fix ioeventfd endianness on bi-endian architectures, Paolo Bonzini, 2015/03/18
- [Qemu-devel] [PULL 17/19] profiler: Reenable built-in profiler, Paolo Bonzini, 2015/03/18
- [Qemu-devel] [PULL 13/19] coroutine-io: Return -errno in case of error,
Paolo Bonzini <=
- Re: [Qemu-devel] [PULL 00/19] Misc bugfixes for 2.3.0-rc1, Peter Maydell, 2015/03/19