• T
    net: Deprecate the "name" parameter of -net · 101625a4
    Thomas Huth 提交于
    In early times, network backends were specified by a "vlan" and "name"
    tuple. With the introduction of netdevs, the "name" was replaced by an
    "id" (which is supposed to be unique), but the "name" parameter stayed
    as an alias which could be used instead of "id". Unfortunately, we miss
    the duplication check for "name":
    
     $ qemu-system-x86_64 -net user,name=n1 -net user,name=n1
    
    ... starts without an error, while "id" correctly complains:
    
     $ qemu-system-x86_64 -net user,id=n1 -net user,id=n1
     qemu-system-x86_64: -net user,id=n1: Duplicate ID 'n1' for net
    
    Instead of trying to fix the code for the legacy "name" parameter, let's
    rather get rid of this old interface and deprecate the "name" parameter
    now - this will also be less confusing for the users in the long run.
    Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
    Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
    Signed-off-by: NThomas Huth <thuth@redhat.com>
    101625a4
net.c 44.9 KB