OSDN Git Service

vhost-user: stick to -errno error return convention
authorRoman Kagan <rvkagan@yandex-team.ru>
Thu, 11 Nov 2021 15:33:52 +0000 (18:33 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 7 Jan 2022 10:19:55 +0000 (05:19 -0500)
commit025faa872bcf919259465419bee443b8a3ce3da1
treefaf468fbac84330fd5a796cd8973c4ecb33503ce
parent3631151b3e3c53ce70c370e68241e9876e2dbb3a
vhost-user: stick to -errno error return convention

VhostOps methods in user_ops are not very consistent in their error
returns: some return negated errno while others just -1.

Make sure all of them consistently return negated errno.  This also
helps error propagation from the functions being called inside.
Besides, this synchronizes the error return convention with the other
two vhost backends, kernel and vdpa, and will therefore allow for
consistent error propagation in the generic vhost code (in a followup
patch).

Signed-off-by: Roman Kagan <rvkagan@yandex-team.ru>
Message-Id: <20211111153354.18807-9-rvkagan@yandex-team.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vhost-user.c