qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/3] vhost: error code


From: Michael S. Tsirkin
Subject: [Qemu-devel] [PATCH 2/3] vhost: error code
Date: Wed, 6 Oct 2010 15:20:28 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

fix up errors returned to include errno, not just -1

Signed-off-by: Michael S. Tsirkin <address@hidden>
---
 hw/vhost.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/vhost.c b/hw/vhost.c
index 5ac283b..2e5d7a6 100644
--- a/hw/vhost.c
+++ b/hw/vhost.c
@@ -516,12 +516,14 @@ static int vhost_virtqueue_init(struct vhost_dev *dev,
     file.fd = event_notifier_get_fd(virtio_queue_get_host_notifier(vvq));
     r = ioctl(dev->control, VHOST_SET_VRING_KICK, &file);
     if (r) {
+        r = -errno;
         goto fail_kick;
     }
 
     file.fd = event_notifier_get_fd(virtio_queue_get_guest_notifier(vvq));
     r = ioctl(dev->control, VHOST_SET_VRING_CALL, &file);
     if (r) {
+        r = -errno;
         goto fail_call;
     }
 
-- 
1.7.3-rc1




reply via email to

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