]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
vhost: error code
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 6 Oct 2010 13:20:28 +0000 (15:20 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 12 Oct 2010 21:10:00 +0000 (16:10 -0500)
fix up errors returned to include errno, not just -1

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit c885212109b0ad79888ced410c2ff0d0e883cb15)

hw/vhost.c

index f6689a7b99dcfc30f79ded8c263dee8df9aca96e..3dc56d2c9e0210a28a2df71eeacd203d3c4c7dc4 100644 (file)
@@ -517,12 +517,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;
     }