
On 19 September 2018 at 23:07, Markus Armbruster <armbru@redhat.com> wrote:
Thomas Huth <thuth@redhat.com> writes:
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.
While we're at it, also deprecate the old syntax for the hostfwd_add and hostfwd_remove commands that still work with this legacy "hub" plus "name" tuple. It is enough to specify the netdev id there instead.
Also add a missing dependency to the Makefile to make sure that the docs get correctly regenerated when qemu-deprecated.texi is changed.
Sure sounds like three patches to me.
I've occasionally wondered if we should have a checkpatch warning "Commit message contains the string 'Also'" :-) thanks -- PMM