qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/7] vhost: Return 0/-errno in vhost_dev_init()


From: Stefano Garzarella
Subject: Re: [PATCH 3/7] vhost: Return 0/-errno in vhost_dev_init()
Date: Thu, 10 Jun 2021 11:09:34 +0200

On Wed, Jun 09, 2021 at 05:46:54PM +0200, Kevin Wolf wrote:
Instead of just returning 0/-1 and letting the caller make up a
meaningless error message, switch to 0/-errno so that different kinds of
errors can be distinguished in the caller.

This involves changing a few more callbacks in VhostOps to return
0/-errno: .vhost_set_owner(), .vhost_get_features() and
.vhost_virtqueue_set_busyloop_timeout(). The implementations of these
functions are trivial as they generally just send a message to the
backend.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
hw/virtio/vhost-backend.c |  4 +++-
hw/virtio/vhost-user.c    | 10 +++++++---
hw/virtio/vhost-vdpa.c    |  4 +++-
hw/virtio/vhost.c         |  8 ++++----
4 files changed, 17 insertions(+), 9 deletions(-)

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]