[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/24] vhost-user: return a read error
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH 08/24] vhost-user: return a read error |
Date: |
Tue, 21 Jun 2016 12:02:36 +0200 |
From: Marc-André Lureau <address@hidden>
Return read errors (not sure why those were ignored)
Signed-off-by: Marc-André Lureau <address@hidden>
---
hw/virtio/vhost-user.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index e51df27..819481d 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -221,7 +221,7 @@ static int vhost_user_set_log_base(struct vhost_dev *dev,
uint64_t base,
if (shmfd) {
msg.size = 0;
if (vhost_user_read(dev, &msg) < 0) {
- return 0;
+ return -1;
}
if (msg.request != VHOST_USER_SET_LOG_BASE) {
@@ -373,7 +373,7 @@ static int vhost_user_get_vring_base(struct vhost_dev *dev,
}
if (vhost_user_read(dev, &msg) < 0) {
- return 0;
+ return -1;
}
if (msg.request != VHOST_USER_GET_VRING_BASE) {
@@ -474,7 +474,7 @@ static int vhost_user_get_u64(struct vhost_dev *dev, int
request, uint64_t *u64)
}
if (vhost_user_read(dev, &msg) < 0) {
- return 0;
+ return -1;
}
if (msg.request != request) {
--
2.7.4
- [Qemu-devel] [PATCH 00/24] vhost-user reconnect fixes, marcandre . lureau, 2016/06/21
- [Qemu-devel] [PATCH 02/24] vhost-user: minor simplification, marcandre . lureau, 2016/06/21
- [Qemu-devel] [PATCH 03/24] qemu-char: check socket is actually connected, marcandre . lureau, 2016/06/21
- [Qemu-devel] [PATCH 01/24] misc: indentation, marcandre . lureau, 2016/06/21
- [Qemu-devel] [PATCH 04/24] vhost-user: check qemu_chr_fe_set_msgfds() return value, marcandre . lureau, 2016/06/21
- [Qemu-devel] [PATCH 07/24] vhost: use error_report() instead of fprintf(stderr, ...), marcandre . lureau, 2016/06/21
- [Qemu-devel] [PATCH 08/24] vhost-user: return a read error,
marcandre . lureau <=
[Qemu-devel] [PATCH 09/24] vhost: make vhost_log_put() idempotent, marcandre . lureau, 2016/06/21
[Qemu-devel] [PATCH 05/24] vhost: change some assert() for error_report() or silent fail, marcandre . lureau, 2016/06/21