qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 1/2] net: Drop the legacy "name" parameter from the -net o


From: Thomas Huth
Subject: Re: [PATCH v2 1/2] net: Drop the legacy "name" parameter from the -net option
Date: Tue, 12 May 2020 16:50:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 12/05/2020 16.26, Eric Blake wrote:
> On 5/12/20 7:31 AM, Thomas Huth wrote:
>> It's been deprecated since QEMU v3.1, so it's time to finally
>> remove it. The "id" parameter can simply be used instead.
>>
>> Reviewed-by: Eric Blake <address@hidden>
>> Signed-off-by: Thomas Huth <address@hidden>
>> ---
>>   docs/system/deprecated.rst | 15 +++++++++------
>>   net/net.c                  | 10 +---------
>>   qapi/net.json              |  3 ---
>>   3 files changed, 10 insertions(+), 18 deletions(-)
>>
> 
>> +++ b/qapi/net.json
>> @@ -474,8 +474,6 @@
>>   #
>>   # @id: identifier for monitor commands
>>   #
>> -# @name: identifier for monitor commands, ignored if @id is present
>> -#
>>   # @opts: device type specific properties (legacy)
>>   #
>>   # Since: 1.2
>> @@ -483,7 +481,6 @@
>>   { 'struct': 'NetLegacy',
>>     'data': {
>>       '*id':   'str',
>> -    '*name': 'str',
>>       'opts':  'NetLegacyOptions' } }
> 
> Why is 'id' left optional? I'd expect it to be mandatory, now.

That's because it is still optional, indeed. It is currently perfectly
valid to run "qemu-system-xyz -net user -net nic" without specifying any
"id". If I remove the "*" here, the old syntax breaks. I don't think
that we want this here, so "*id" has to stay optional.
(FWIW, the ID is then created internally, see assign_name() in net/net.c)

 Thomas




reply via email to

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