[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 32/33] net: Drop the legacy "name" parameter from the -net option
From: |
Jason Wang |
Subject: |
[PULL 32/33] net: Drop the legacy "name" parameter from the -net option |
Date: |
Tue, 16 Jun 2020 14:45:43 +0800 |
From: Thomas Huth <thuth@redhat.com>
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 <eblake@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
docs/system/deprecated.rst | 15 +++++++++------
net/net.c | 10 +---------
qapi/net.json | 3 ---
3 files changed, 10 insertions(+), 18 deletions(-)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 544ece0..3a25559 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -47,12 +47,6 @@ The 'file' driver for drives is no longer appropriate for
character or host
devices and will only accept regular files (S_IFREG). The correct driver
for these file types is 'host_cdrom' or 'host_device' as appropriate.
-``-net ...,name=``\ *name* (since 3.1)
-''''''''''''''''''''''''''''''''''''''
-
-The ``name`` parameter of the ``-net`` option is a synonym
-for the ``id`` parameter, which should now be used instead.
-
``-smp`` (invalid topologies) (since 3.1)
'''''''''''''''''''''''''''''''''''''''''
@@ -441,6 +435,15 @@ What follows is a record of recently removed, formerly
deprecated
features that serves as a record for users who have encountered
trouble after a recent upgrade.
+System emulator command line arguments
+--------------------------------------
+
+``-net ...,name=``\ *name* (removed in 5.1)
+'''''''''''''''''''''''''''''''''''''''''''
+
+The ``name`` parameter of the ``-net`` option was a synonym
+for the ``id`` parameter, which should now be used instead.
+
QEMU Machine Protocol (QMP) commands
------------------------------------
diff --git a/net/net.c b/net/net.c
index 4c62b10..e55d357 100644
--- a/net/net.c
+++ b/net/net.c
@@ -969,12 +969,10 @@ static int net_client_init1(const void *object, bool
is_netdev, Error **errp)
{
Netdev legacy = {0};
const Netdev *netdev;
- const char *name;
NetClientState *peer = NULL;
if (is_netdev) {
netdev = object;
- name = netdev->id;
if (netdev->type == NET_CLIENT_DRIVER_NIC ||
!net_client_init_fun[netdev->type]) {
@@ -987,12 +985,6 @@ static int net_client_init1(const void *object, bool
is_netdev, Error **errp)
const NetLegacyOptions *opts = net->opts;
legacy.id = net->id;
netdev = &legacy;
- /* missing optional values have been initialized to "all bits zero" */
- name = net->has_id ? net->id : net->name;
-
- if (net->has_name) {
- warn_report("The 'name' parameter is deprecated, use 'id'
instead");
- }
/* Map the old options to the new flat type */
switch (opts->type) {
@@ -1052,7 +1044,7 @@ static int net_client_init1(const void *object, bool
is_netdev, Error **errp)
}
}
- if (net_client_init_fun[netdev->type](netdev, name, peer, errp) < 0) {
+ if (net_client_init_fun[netdev->type](netdev, netdev->id, peer, errp) < 0)
{
/* FIXME drop when all init functions store an Error */
if (errp && !*errp) {
error_setg(errp, QERR_DEVICE_INIT_FAILED,
diff --git a/qapi/net.json b/qapi/net.json
index cebb1b5..fc7c95f 100644
--- a/qapi/net.json
+++ 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' } }
##
--
2.5.0
- [PULL 23/33] net: use peer when purging queue in qemu_flush_or_purge_queue_packets(), (continued)
- [PULL 23/33] net: use peer when purging queue in qemu_flush_or_purge_queue_packets(), Jason Wang, 2020/06/16
- [PULL 24/33] net/colo-compare.c: Create event_bh with the right AioContext, Jason Wang, 2020/06/16
- [PULL 27/33] net/colo-compare.c: Only hexdump packets if tracing is enabled, Jason Wang, 2020/06/16
- [PULL 25/33] chardev/char.c: Use qemu_co_sleep_ns if in coroutine, Jason Wang, 2020/06/16
- [PULL 26/33] net/colo-compare.c: Fix deadlock in compare_chr_send, Jason Wang, 2020/06/16
- [PULL 28/33] net/colo-compare.c: Check that colo-compare is active, Jason Wang, 2020/06/16
- [PULL 29/33] net/colo-compare.c: Correct ordering in complete and finalize, Jason Wang, 2020/06/16
- [PULL 30/33] colo-compare: Fix memory leak in packet_enqueue(), Jason Wang, 2020/06/16
- [PULL 31/33] hw/net/e1000e: Do not abort() on invalid PSRCTL register value, Jason Wang, 2020/06/16
- [PULL 33/33] net: Drop the NetLegacy structure, always use Netdev instead, Jason Wang, 2020/06/16
- [PULL 32/33] net: Drop the legacy "name" parameter from the -net option,
Jason Wang <=
- Re: [PULL 00/33] Net patches, Peter Maydell, 2020/06/16