projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87656d5
)
vhost-user: print original request on error
author
Michael S. Tsirkin
<mst@redhat.com>
Mon, 16 Nov 2015 11:55:53 +0000
(13:55 +0200)
committer
Michael S. Tsirkin
<mst@redhat.com>
Mon, 16 Nov 2015 12:35:16 +0000
(14:35 +0200)
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>
hw/virtio/vhost-user.c
patch
|
blob
|
history
diff --git
a/hw/virtio/vhost-user.c
b/hw/virtio/vhost-user.c
index 3404b81edac52f07bdbbb0a9e204a999af1b277a..5bc6c45deeb5fb4fdbac6ea9679cefbc8a55bd8b 100644
(file)
--- 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;
}