From patchwork Fri Dec 6 05:36:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 1204930 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="OcL5mEzX"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47ThDs6zsjz9sPW for ; Fri, 6 Dec 2019 16:37:32 +1100 (AEDT) Received: from localhost ([::1]:35836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1id6Iz-0001fT-FL for incoming@patchwork.ozlabs.org; Fri, 06 Dec 2019 00:37:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37881) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1id6IR-0001fE-Fq for qemu-devel@nongnu.org; Fri, 06 Dec 2019 00:36:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1id6IP-00047v-Gg for qemu-devel@nongnu.org; Fri, 06 Dec 2019 00:36:54 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:31854 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1id6IP-00043y-Bt for qemu-devel@nongnu.org; Fri, 06 Dec 2019 00:36:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575610612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YY8FOOL5oTPpCvzIkk6vxcAQ2Nu3DuSMiFoOEgtXOJY=; b=OcL5mEzXB/gjvPYM3Wp0gPXfigYe40At21f8emEy20+6yZCr4rkhZNhoO64YFQ+fh0hQd0 5ATTaquLz/B5NNZzwzALJu/U/F4vawfFIaYbmYAyeHPkIjAIWLonzP/5UUHL4087+I0bSg FQx72r3amJM+9WPMIbnK3NPoZu2luK8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-167-0_dPT5VKOxarv0mlf0cF6w-1; Fri, 06 Dec 2019 00:36:50 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7D51980059D for ; Fri, 6 Dec 2019 05:36:49 +0000 (UTC) Received: from thuth.com (ovpn-116-97.ams2.redhat.com [10.36.116.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id 11FC560FC1; Fri, 6 Dec 2019 05:36:47 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Jason Wang , Eric Blake , Markus Armbruster Subject: [PATCH 1/2] net: Drop the legacy "name" parameter from the -net option Date: Fri, 6 Dec 2019 06:36:39 +0100 Message-Id: <20191206053640.29368-2-thuth@redhat.com> In-Reply-To: <20191206053640.29368-1-thuth@redhat.com> References: <20191206053640.29368-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: 0_dPT5VKOxarv0mlf0cF6w-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" It's been deprecated since QEMU v3.1, so it's time to finally remove it. The "id" parameter can simply be used instead. Signed-off-by: Thomas Huth Reviewed-by: Eric Blake --- net/net.c | 10 +--------- qapi/net.json | 4 +--- qemu-deprecated.texi | 12 +++++++----- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/net/net.c b/net/net.c index 84aa6d8d00..ee4a76eb3e 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 335295be50..ff280ccd16 100644 --- a/qapi/net.json +++ b/qapi/net.json @@ -488,18 +488,16 @@ # # @id: identifier for monitor commands # -# @name: identifier for monitor commands, ignored if @id is present -# # @opts: device type specific properties (legacy) # # Since: 1.2 # # 'vlan': dropped in 3.0 +# 'name': dropped in 5.0 ## { 'struct': 'NetLegacy', 'data': { '*id': 'str', - '*name': 'str', 'opts': 'NetLegacyOptions' } } ## diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 2850f9a520..2f9efb45ba 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -42,11 +42,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. -@subsection -net ...,name=@var{name} (since 3.1) - -The @option{name} parameter of the @option{-net} option is a synonym -for the @option{id} parameter, which should now be used instead. - @subsection -smp (invalid topologies) (since 3.1) CPU topology properties should describe whole machine topology including @@ -371,6 +366,13 @@ 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. +@section System emulator command line arguments + +@subsection -net ...,name=@var{name} (removed in 5.0) + +The @option{name} parameter of the @option{-net} option was a synonym +for the @option{id} parameter, which should now be used instead. + @section Human Monitor Protocol (HMP) commands @subsection The hub_id parameter of 'hostfwd_add' / 'hostfwd_remove' (removed in 5.0)