From patchwork Fri May 20 15:50:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 1562 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:53:07 -0000 Delivered-To: patches@linaro.org Received: by 10.224.54.134 with SMTP id q6cs166564qag; Fri, 20 May 2011 08:50:09 -0700 (PDT) Received: by 10.217.5.130 with SMTP id w2mr150222wes.61.1305906608520; Fri, 20 May 2011 08:50:08 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id r28si7189155wen.187.2011.05.20.08.50.07 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 May 2011 08:50:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QNRxh-0006ax-Pv; Fri, 20 May 2011 16:50:01 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: Markus Armbruster , patches@linaro.org Subject: [PATCH 2/3] net: Don't warn about the default network setup Date: Fri, 20 May 2011 16:50:00 +0100 Message-Id: <1305906601-25324-3-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> 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 (2) CONFIG_SLIRP not set, so the implicit "-net nic" sets up a nic that isn't connected to anything Signed-off-by: Peter Maydell --- net.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index 1b521a9..68c2840 100644 --- a/net.c +++ b/net.c @@ -1305,6 +1305,18 @@ void net_check_clients(void) VLANState *vlan; VLANClientState *vc; + /* Don't warn about the default network setup that you get if + * no command line -net or -netdev 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 + * (2) CONFIG_SLIRP not set, in which case the implicit "-net nic" + * sets up a nic that isn't connected to anything. + */ + if (default_net) { + return; + } + QTAILQ_FOREACH(vlan, &vlans, next) { int has_nic = 0, has_host_dev = 0;