From: Nick Erdmann <n@nirf.de>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: [PATCH] vhost-vsock: fix error message output
Date: Sun, 1 Mar 2020 13:03:06 +0100 [thread overview]
Message-ID: <04df3f47-c93b-1d02-d250-f9bda8dbc0fa@nirf.de> (raw)
error_setg_errno takes a positive error number, so we should not invert
errno's sign.
Signed-off-by: Nick Erdmann <n@nirf.de>
---
hw/virtio/vhost-vsock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vsock.c b/hw/virtio/vhost-vsock.c
index 66da96583b..9f9093e196 100644
--- a/hw/virtio/vhost-vsock.c
+++ b/hw/virtio/vhost-vsock.c
@@ -325,7 +325,7 @@ static void vhost_vsock_device_realize(DeviceState *dev, Error **errp)
} else {
vhostfd = open("/dev/vhost-vsock", O_RDWR);
if (vhostfd < 0) {
- error_setg_errno(errp, -errno,
+ error_setg_errno(errp, errno,
"vhost-vsock: failed to open vhost device");
return;
}
--
2.25.1
next reply other threads:[~2020-03-01 12:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-01 12:03 Nick Erdmann [this message]
2020-03-02 10:29 ` [PATCH] vhost-vsock: fix error message output Ján Tomko
2020-03-03 10:16 ` Laurent Vivier
2020-03-04 8:13 ` Stefano Garzarella
2020-03-06 12:56 ` Stefan Hajnoczi
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=04df3f47-c93b-1d02-d250-f9bda8dbc0fa@nirf.de \
--to=n@nirf.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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).