From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org, avi@redhat.com, mtosatti@redhat.com,
Alex Williamson <alex.williamson@redhat.com>,
Juan Quintela <quintela@redhat.com>,
Amit Shah <amit.shah@redhat.com>
Subject: [Qemu-devel] [PATCH 2/3] vhost: error code
Date: Wed, 6 Oct 2010 15:20:28 +0200 [thread overview]
Message-ID: <875152723ad6bf789d78c89193b15da31d027904.1286369456.git.mst@redhat.com> (raw)
In-Reply-To: <cover.1286369456.git.mst@redhat.com>
fix up errors returned to include errno, not just -1
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
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
prev parent reply other threads:[~2010-10-06 13:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 13:20 [Qemu-devel] [PATCH 0/3] qemu-kvm/vhost: fix qemu assert triggerable by guest Michael S. Tsirkin
2010-10-06 13:20 ` [Qemu-devel] [PATCH 1/3] virtio: change set guest notifier to per-device Michael S. Tsirkin
2010-10-06 13:20 ` [Qemu-devel] [PATCH 3/3] vhost: fix up irqfd support Michael S. Tsirkin
2010-10-06 13:20 ` Michael S. Tsirkin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875152723ad6bf789d78c89193b15da31d027904.1286369456.git.mst@redhat.com \
--to=mst@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=amit.shah@redhat.com \
--cc=avi@redhat.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).