diff options
| author | Michael S. Tsirkin | 2015-11-16 12:55:53 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin | 2015-11-16 13:35:16 +0100 |
| commit | 5421f318ecc82294ad089fd54924df787b67c971 (patch) | |
| tree | 16ba90fe5892c7b2eccd1d82e40dc2d72f9e0c98 /hw | |
| parent | vhost-user-test: support VHOST_USER_SET_VRING_ENABLE (diff) | |
| download | qemu-5421f318ecc82294ad089fd54924df787b67c971.tar.gz qemu-5421f318ecc82294ad089fd54924df787b67c971.tar.xz qemu-5421f318ecc82294ad089fd54924df787b67c971.zip | |
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 <mst@redhat.com>
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/virtio/vhost-user.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |
