From patchwork Thu Dec 7 18:02:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 845752 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yt3J46v4Kz9s7B for ; Fri, 8 Dec 2017 05:03:32 +1100 (AEDT) Received: from localhost ([::1]:33677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eN0WB-00012q-1R for incoming@patchwork.ozlabs.org; Thu, 07 Dec 2017 13:03:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eN0VN-0000dT-J9 for qemu-devel@nongnu.org; Thu, 07 Dec 2017 13:02:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eN0VM-0007id-GO for qemu-devel@nongnu.org; Thu, 07 Dec 2017 13:02:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51320) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eN0VM-0007hD-7a for qemu-devel@nongnu.org; Thu, 07 Dec 2017 13:02:40 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4B1F4C04AC40; Thu, 7 Dec 2017 18:02:39 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-87.ams2.redhat.com [10.36.116.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BB0D784B2; Thu, 7 Dec 2017 18:02:37 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Jason Wang , Samuel Thibault Date: Thu, 7 Dec 2017 19:02:34 +0100 Message-Id: <1512669755-8409-2-git-send-email-thuth@redhat.com> In-Reply-To: <1512669755-8409-1-git-send-email-thuth@redhat.com> References: <1512669755-8409-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 07 Dec 2017 18:02:39 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH for-2.12 1/2] net: Remove the legacy "-net channel" parameter X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" It has never been documented, so hardly anybody knows about this parameter, and it is marked as deprecated since QEMU v2.6. Time to let it go now. Signed-off-by: Thomas Huth Reviewed-by: Samuel Thibault --- include/net/slirp.h | 2 -- net/net.c | 7 ------- net/slirp.c | 34 ---------------------------------- qemu-doc.texi | 5 ----- 4 files changed, 48 deletions(-) diff --git a/include/net/slirp.h b/include/net/slirp.h index 64b795c..0c98e46 100644 --- a/include/net/slirp.h +++ b/include/net/slirp.h @@ -36,8 +36,6 @@ void hmp_hostfwd_remove(Monitor *mon, const QDict *qdict); int net_slirp_redir(const char *redir_str); -int net_slirp_parse_legacy(QemuOptsList *opts_list, const char *optarg, int *ret); - int net_slirp_smb(const char *exported_dir); void hmp_info_usernet(Monitor *mon, const QDict *qdict); diff --git a/net/net.c b/net/net.c index 39ef546..7425857 100644 --- a/net/net.c +++ b/net/net.c @@ -1565,13 +1565,6 @@ int net_init_clients(void) int net_client_parse(QemuOptsList *opts_list, const char *optarg) { -#if defined(CONFIG_SLIRP) - int ret; - if (net_slirp_parse_legacy(opts_list, optarg, &ret)) { - return ret; - } -#endif - if (!qemu_opts_parse_noisily(opts_list, optarg, true)) { return -1; } diff --git a/net/slirp.c b/net/slirp.c index 318a26e..cb8ca23 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -956,37 +956,3 @@ int net_init_slirp(const Netdev *netdev, const char *name, return ret; } - -int net_slirp_parse_legacy(QemuOptsList *opts_list, const char *optarg, int *ret) -{ - if (strcmp(opts_list->name, "net") != 0 || - strncmp(optarg, "channel,", strlen("channel,")) != 0) { - return 0; - } - - error_report("The '-net channel' option is deprecated. " - "Please use '-netdev user,guestfwd=...' instead."); - - /* handle legacy -net channel,port:chr */ - optarg += strlen("channel,"); - - if (QTAILQ_EMPTY(&slirp_stacks)) { - struct slirp_config_str *config; - - config = g_malloc(sizeof(*config)); - pstrcpy(config->str, sizeof(config->str), optarg); - config->flags = SLIRP_CFG_LEGACY; - config->next = slirp_configs; - slirp_configs = config; - *ret = 0; - } else { - Error *err = NULL; - *ret = slirp_guestfwd(QTAILQ_FIRST(&slirp_stacks), optarg, 1, &err); - if (*ret < 0) { - error_report_err(err); - } - } - - return 1; -} - diff --git a/qemu-doc.texi b/qemu-doc.texi index db2351c..982cab5 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -2459,11 +2459,6 @@ The ``-smb /some/dir'' argument is now a synonym for setting the ``-netdev user,smb=/some/dir'' argument instead. The new syntax allows different settings to be provided per NIC. -@subsection -net channel (since 2.6.0) - -The ``--net channel,ARGS'' argument is now a synonym for setting -the ``-netdev user,guestfwd=ARGS'' argument instead. - @subsection -net vlan (since 2.9.0) The ``-net vlan=NN'' argument is partially replaced with the