summary refs log tree commit diff stats
path: root/numa.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-03-13 14:17:16 +0100
committerMarkus Armbruster <armbru@redhat.com>2015-06-09 07:40:24 +0200
commit8190483196148f765c65785876f7b893d64b6cdd (patch)
tree17e34ae3ddbf174a94e9e6b94988ee5e43724cf5 /numa.c
parent71df1d833776647fc12f5bbcd6d6fe4c5e931094 (diff)
downloadfocaccia-qemu-8190483196148f765c65785876f7b893d64b6cdd.tar.gz
focaccia-qemu-8190483196148f765c65785876f7b893d64b6cdd.zip
vhost-user: Improve -netdev/netdev_add/-net/... error reporting
When -netdev vhost-user fails, it first reports a specific error, then
one or more generic ones, like this:

    $ qemu-system-x86_64 -netdev vhost-user,id=foo,chardev=xxx
    qemu-system-x86_64: -netdev vhost-user,id=foo,chardev=xxx: chardev "xxx" not found
    qemu-system-x86_64: -netdev vhost-user,id=foo,chardev=xxx: No suitable chardev found
    qemu-system-x86_64: -netdev vhost-user,id=foo,chardev=xxx: Device 'vhost-user' could not be initialized

With the command line, the messages go to stderr.  In HMP, they go to
the monitor.  In QMP, the last one becomes the error reply, and the
others go to stderr.

Convert net_init_vhost_user() and its helpers to Error.  This
suppresses the unwanted unspecific error messages, and makes the
specific error the QMP error reply.

Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'numa.c')
0 files changed, 0 insertions, 0 deletions