qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 9/9] vhost-user: Improve -netdev/netdev_add/-net


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 9/9] vhost-user: Improve -netdev/netdev_add/-net/... error reporting
Date: Thu, 28 May 2015 13:20:20 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 05/28/2015 06:21 AM, Markus Armbruster wrote:
> 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 <address@hidden>
> Cc: Jason Wang <address@hidden>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  net/vhost-user.c | 27 ++++++++++++---------------
>  1 file changed, 12 insertions(+), 15 deletions(-)
> 

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]