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: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 03/15] net: Improve -net nic error reporting
Date: Fri, 15 May 2015 10:38:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Eric Blake <address@hidden> writes:

> 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

Fixing...

>> 
>> 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?

Yup.

> Reviewed-by: Eric Blake <address@hidden>

Thanks!



reply via email to

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