From nobody Mon Feb 9 08:28:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575610631; cv=none; d=zohomail.com; s=zohoarc; b=ipWeGmLdmyAq28ENf8dSJc+oM3EnVjtE7pf4aBxgGBTB5HWzabWoj9zx7Hbh2bJBHqT/zfZFFeJvN242zB8BVk7enZPdxxIiZIog+SBKFhfWHiEBMbUyuyItXBbDP88EYns9mJJhOwg7Czssp+/BKeEf4cFH5QEx8P8kxZ0ez3A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575610631; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7rktF2McdIhACS7yic5Q860CdP7tQi4QMzdfdWiftPY=; b=Pb+7voWTyGeIgnTr5LuaVqkBl81y5/DGxTPX9OYDENd66YNNxou3CHJ7zDq9gJseDrKUTOLx9ab/Zb6dwcXzLxQLEcB9eALlPYbnNSWqB4+6xak5qztgJZPnXQg+f3HOVCrZBEYU9SK8ZAdUi1zD2tVa54CzLE2t9l9vsOxz7Mk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1575610631314169.7970116161481; Thu, 5 Dec 2019 21:37:11 -0800 (PST) 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-371-mdwV3RrkPQaDQx9j0Uniuw-1; Fri, 06 Dec 2019 00:37:07 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 986F2100726A; Fri, 6 Dec 2019 05:37:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 71A855D6BB; Fri, 6 Dec 2019 05:37:02 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2A5D965D35; Fri, 6 Dec 2019 05:37:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB65anpo013535 for ; Fri, 6 Dec 2019 00:36:49 -0500 Received: by smtp.corp.redhat.com (Postfix) id 76A6760FCC; 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575610630; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=7rktF2McdIhACS7yic5Q860CdP7tQi4QMzdfdWiftPY=; b=D+kO582sWr5jzHLS/3UMDMw1LbG+uzva8xwsx2do12w42NSLKx02iMJmqDMKm9vPGJUOHM jKxPZY2JdQsPAL1nuqv5jwtPwoW+HH0xxUu6OhI4FqiKkiqIjbybbGfQGRhMtPlxmDgEEo BS4I0Qglm05VViG5uhQBu2z6ljo9Jts= From: Thomas Huth To: qemu-devel@nongnu.org, Jason Wang , Eric Blake , Markus Armbruster 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-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] net: Drop the legacy "name" parameter from the -net option X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: mdwV3RrkPQaDQx9j0Uniuw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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 =3D {0}; const Netdev *netdev; - const char *name; NetClientState *peer =3D NULL; =20 if (is_netdev) { netdev =3D object; - name =3D netdev->id; =20 if (netdev->type =3D=3D NET_CLIENT_DRIVER_NIC || !net_client_init_fun[netdev->type]) { @@ -987,12 +985,6 @@ static int net_client_init1(const void *object, bool i= s_netdev, Error **errp) const NetLegacyOptions *opts =3D net->opts; legacy.id =3D net->id; netdev =3D &legacy; - /* missing optional values have been initialized to "all bits zero= " */ - name =3D net->has_id ? net->id : net->name; - - if (net->has_name) { - warn_report("The 'name' parameter is deprecated, use 'id' inst= ead"); - } =20 /* 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) } } =20 - 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' } } =20 ## 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 fo= r 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. =20 -@subsection -net ...,name=3D@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) =20 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. =20 +@section System emulator command line arguments + +@subsection -net ...,name=3D@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 =20 @subsection The hub_id parameter of 'hostfwd_add' / 'hostfwd_remove' (remo= ved in 5.0) --=20 2.18.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list