Skip to content

Commit

Permalink
vhost-user: print original request on error
Browse files Browse the repository at this point in the history
When we get an unexpected response, print out
the original request.
Helps debug protocol errors tremendously.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
mstsirkin committed Nov 16, 2015
1 parent 87656d5 commit 5421f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/virtio/vhost-user.c
Expand Up @@ -121,8 +121,8 @@ static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg)

r = qemu_chr_fe_read_all(chr, p, size);
if (r != size) {
error_report("Failed to read msg header. Read %d instead of %d.", r,
size);
error_report("Failed to read msg header. Read %d instead of %d."
" Original request %d.", r, size, msg->request);
goto fail;
}

Expand Down

0 comments on commit 5421f31

Please sign in to comment.