qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vhost-vsock: fix error message output
@ 2020-03-01 12:03 Nick Erdmann
  2020-03-02 10:29 ` Ján Tomko
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Nick Erdmann @ 2020-03-01 12:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-06 12:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-01 12:03 [PATCH] vhost-vsock: fix error message output Nick Erdmann
2020-03-02 10:29 ` Ján Tomko
2020-03-03 10:16 ` Laurent Vivier
2020-03-04  8:13 ` Stefano Garzarella
2020-03-06 12:56 ` Stefan Hajnoczi

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).