From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNRxs-0005Vj-8Q for qemu-devel@nongnu.org; Fri, 20 May 2011 11:50:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNRxr-0001Ko-4B for qemu-devel@nongnu.org; Fri, 20 May 2011 11:50:12 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:49864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNRxq-0001GH-Sr for qemu-devel@nongnu.org; Fri, 20 May 2011 11:50:11 -0400 From: Peter Maydell Date: Fri, 20 May 2011 16:50:00 +0100 Message-Id: <1305906601-25324-3-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1305906601-25324-1-git-send-email-peter.maydell@linaro.org> References: <1305906601-25324-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 2/3] net: Don't warn about the default network setup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Markus Armbruster , patches@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; -- 1.7.1