From patchwork Fri May 20 15:49:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 96639 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 10295B71A5 for ; Sat, 21 May 2011 01:51:47 +1000 (EST) Received: from localhost ([::1]:45261 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNRzM-00083A-Ha for incoming@patchwork.ozlabs.org; Fri, 20 May 2011 11:51:44 -0400 Received: from eggs.gnu.org ([140.186.70.92]:44695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNRxt-0005Xk-94 for qemu-devel@nongnu.org; Fri, 20 May 2011 11:50:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNRxs-0001L9-C6 for qemu-devel@nongnu.org; Fri, 20 May 2011 11:50:13 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:49864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNRxs-0001GH-4A for qemu-devel@nongnu.org; Fri, 20 May 2011 11:50:12 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QNRxh-0006av-PN; Fri, 20 May 2011 16:50:01 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 20 May 2011 16:49:59 +0100 Message-Id: <1305906601-25324-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1305906601-25324-1-git-send-email-peter.maydell@linaro.org> References: <1305906601-25324-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: Markus Armbruster , patches@linaro.org Subject: [Qemu-devel] [PATCH 1/3] Revert "net: Improve the warnings for dubious command line option combinations" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 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-bounces+incoming=patchwork.ozlabs.org@nongnu.org This reverts commit f68b9d672b90dedc79aeb9b44607f484dbe46a6b. That attempt at diagnosing unused -net nic options failed to account for NICs created via -device; back it out cleanly in preparation for implementing in a different manner. Signed-off-by: Peter Maydell --- net.c | 31 ------------------------------- 1 files changed, 0 insertions(+), 31 deletions(-) diff --git a/net.c b/net.c index 4f777c3..1b521a9 100644 --- a/net.c +++ b/net.c @@ -1304,22 +1304,6 @@ void net_check_clients(void) { VLANState *vlan; VLANClientState *vc; - int seen_nics = 0; - - /* Don't warn about the default network setup that you get if - * no command line -net options are specified. There are two - * cases that we would otherwise complain about: - * (1) board doesn't support a NIC but the implicit "-net nic" - * requested one; we'd otherwise complain about more NICs being - * specified than we support, and also that the vlan set up by - * the implicit "-net user" didn't have any NICs connected to it - * (2) CONFIG_SLIRP not set: we'd otherwise complain about the - * implicit "-net nic" setting up a nic that wasn't connected to - * anything. - */ - if (default_net) { - return; - } QTAILQ_FOREACH(vlan, &vlans, next) { int has_nic = 0, has_host_dev = 0; @@ -1327,7 +1311,6 @@ void net_check_clients(void) QTAILQ_FOREACH(vc, &vlan->clients, next) { switch (vc->info->type) { case NET_CLIENT_TYPE_NIC: - seen_nics++; has_nic = 1; break; case NET_CLIENT_TYPE_SLIRP: @@ -1347,26 +1330,12 @@ void net_check_clients(void) vlan->id); } QTAILQ_FOREACH(vc, &non_vlan_clients, next) { - if (vc->info->type == NET_CLIENT_TYPE_NIC) { - seen_nics++; - } if (!vc->peer) { fprintf(stderr, "Warning: %s %s has no peer\n", vc->info->type == NET_CLIENT_TYPE_NIC ? "nic" : "netdev", vc->name); } } - if (seen_nics != nb_nics) { - /* Number of NICs requested by user on command line doesn't match - * the number the model actually registered with us. - * This will generally only happen for models of embedded boards - * with no PCI bus or similar. PCI based machines can instantiate - * all requested NICs as PCI devices but usually embedded boards - * only have a single NIC. - */ - fprintf(stderr, "Warning: more nics requested than this machine " - "supports; some have been ignored\n"); - } } static int net_init_client(QemuOpts *opts, void *dummy)