qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 06/15] tap: Improve -netdev/netdev_add/-net/...


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 06/15] tap: Improve -netdev/netdev_add/-net/... bridge error reporting
Date: Thu, 14 May 2015 10:56:22 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 05/12/2015 06:02 AM, Markus Armbruster wrote:
> When -netdev bridge fails, it first reports a specific error, then a
> generic one, like this:
> 
>     $ qemu-system-x86_64 -netdev bridge,id=foo
>     failed to launch bridge helper
>     qemu-system-x86_64: -netdev bridge,id=foo: Device 'bridge' could not be 
> initialized
> 
> The first message goes to stderr.  Wrong for HMP, because errors need
> to go to the monitor there.
> 
> The second message goes to stderr for -netdev, to the monitor for HMP
> netdev_add, and becomes the error reply for QMP netdev_add.
> 
> Convert net_bridge_run_helper() to Error, and propagate its errors
> through net_init_bridge().  This ensures the error gets reported where
> the user is, and suppresses the unwanted second message.
> 
> While there, improve the error messages a bit.
> 
> The above example becomes:
> 
>     $ qemu-system-x86_64 -netdev bridge,id=foo
>     qemu-system-x86_64: -netdev bridge,id=foo: bridge helper failed
> 
> net_init_tap() also uses net_bridge_run_helper().  Propagate its
> errors there as well.  Improves reporting these errors with -netdev
> tap & friends.
> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  net/tap.c | 30 +++++++++++++++++++-----------
>  1 file changed, 19 insertions(+), 11 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]