qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 03/15] net: Improve -net nic error reporting


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 03/15] net: Improve -net nic error reporting
Date: Thu, 14 May 2015 10:07:03 -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 -net nic fails, it first reports a specific error, then a generic
> one, like this:
> 
>     $ qemu-system-x86_64 -net nic,netdev=nonexistant
>     qemu-system-x86_64: -net nic,netdev=nonexistant: netdev 'nonexistant' not 
> found
>     qemu-system-x86_64: -net nic,netdev=nonexistant: Device 'nic' could not 
> be initialized

s/nonexistant/nonexistent/g

> 
> Convert net_init_nic() to Error to get rid of the unwanted second
> error message.
> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  net/net.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 

> @@ -745,7 +744,7 @@ static int net_init_nic(const NetClientOptions *opts, 
> const char *name,
>  
>      idx = nic_get_free_idx();
>      if (idx == -1 || nb_nics >= MAX_NICS) {
> -        error_report("Too Many NICs");
> +        error_setg(errp, "Too Many NICs");

worth s/Many/many/ while touching this?

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]