From: Michael S. Tsirkin Date: Mon, 16 Nov 2015 11:55:53 +0000 (+0200) Subject: vhost-user: print original request on error X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5421f318ecc82294ad089fd54924df787b67c971;p=qemu.git vhost-user: print original request on error When we get an unexpected response, print out the original request. Helps debug protocol errors tremendously. Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 3404b81eda..5bc6c45dee 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -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; }