From 1b94b96d0d892d8fd33f7d16cf17d3b05f1920e6 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Fri, 20 May 2011 16:50:00 +0100 Subject: [PATCH] net: Don't warn about the default network setup 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 Signed-off-by: Anthony Liguori --- net.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; -- 2.7.4