qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]