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 <n@nirf.de> Message-Id: <04df3f47-c93b-1d02-d250-f9bda8dbc0fa@nirf.de> Reviewed-by: Ján Tomko <jtomko@redhat.com> Fixes: fc0b9b0e1cbb ("vhost-vsock: add virtio sockets device") Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
f7ef7e6e3b
commit
f1e92c3d52
@ -325,7 +325,7 @@ static void vhost_vsock_device_realize(DeviceState *dev, Error **errp)
|
|||||||
} else {
|
} else {
|
||||||
vhostfd = open("/dev/vhost-vsock", O_RDWR);
|
vhostfd = open("/dev/vhost-vsock", O_RDWR);
|
||||||
if (vhostfd < 0) {
|
if (vhostfd < 0) {
|
||||||
error_setg_errno(errp, -errno,
|
error_setg_errno(errp, errno,
|
||||||
"vhost-vsock: failed to open vhost device");
|
"vhost-vsock: failed to open vhost device");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user