summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2011-05-20 16:50:00 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-06-22 07:18:38 -0500
commit641f6eae757e5b2cf854fec14038ffd229e9adea (patch)
tree1b32fb73c2dfe487ad7af51d691b377cddbb1215
parent1d66f1709435c2c72e2773549729b541e6d3d626 (diff)
downloadfocaccia-qemu-641f6eae757e5b2cf854fec14038ffd229e9adea.tar.gz
focaccia-qemu-641f6eae757e5b2cf854fec14038ffd229e9adea.zip
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 <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--net.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net.c b/net.c
index 1b521a95c2..68c2840621 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;