]> xenbits.xensource.com Git - qemu-upstream-4.4-testing.git/commitdiff
vhost: error code
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 6 Oct 2010 13:20:28 +0000 (15:20 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 7 Oct 2010 10:19:47 +0000 (12:19 +0200)
fix up errors returned to include errno, not just -1

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/vhost.c

index fb9512104400ee5ef0eee3357fb9308ec851c040..8586f66baccb80dbc4f6153ac111e32e0f2f0de4 100644 (file)
@@ -515,12 +515,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;
     }