Hi ----- Original Message ----- > On Tue, Jun 21, 2016 at 12:02:36PM +0200, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau <marcandre.lur...@redhat.com> > > > > Return read errors (not sure why those were ignored) > > > > Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> > > why bother? So callers can just ignore them in turn?
The callers do not always ignore errors, fortunately (see vhost_user_init() for ex). That at least prevents flooding terminal/monitor with multiple errors and helps finding out the origin of the error. > > > --- > > hw/virtio/vhost-user.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c > > index e51df27..819481d 100644 > > --- a/hw/virtio/vhost-user.c > > +++ b/hw/virtio/vhost-user.c > > @@ -221,7 +221,7 @@ static int vhost_user_set_log_base(struct vhost_dev > > *dev, uint64_t base, > > if (shmfd) { > > msg.size = 0; > > if (vhost_user_read(dev, &msg) < 0) { > > - return 0; > > + return -1; > > } > > > > if (msg.request != VHOST_USER_SET_LOG_BASE) { > > @@ -373,7 +373,7 @@ static int vhost_user_get_vring_base(struct vhost_dev > > *dev, > > } > > > > if (vhost_user_read(dev, &msg) < 0) { > > - return 0; > > + return -1; > > } > > > > if (msg.request != VHOST_USER_GET_VRING_BASE) { > > @@ -474,7 +474,7 @@ static int vhost_user_get_u64(struct vhost_dev *dev, > > int request, uint64_t *u64) > > } > > > > if (vhost_user_read(dev, &msg) < 0) { > > - return 0; > > + return -1; > > } > > > > if (msg.request != request) { > > -- > > 2.7.4 >