From: Nick Erdmann Date: Sun, 1 Mar 2020 12:03:06 +0000 (+0100) Subject: vhost-vsock: fix error message output X-Git-Tag: v5.0.0-rc0~51^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1e92c3d52d2223306a1ea289a57fca2bc5c40a5;p=thirdparty%2Fqemu.git vhost-vsock: fix error message output error_setg_errno takes a positive error number, so we should not invert errno's sign. Signed-off-by: Nick Erdmann Message-Id: <04df3f47-c93b-1d02-d250-f9bda8dbc0fa@nirf.de> Reviewed-by: Ján Tomko Fixes: fc0b9b0e1cbb ("vhost-vsock: add virtio sockets device") Reviewed-by: Laurent Vivier Reviewed-by: Stefano Garzarella Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/virtio/vhost-vsock.c b/hw/virtio/vhost-vsock.c index 66da96583b7..9f9093e1964 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; }