diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2011-05-20 16:49:59 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-06-22 07:18:38 -0500 |
commit | 1d66f1709435c2c72e2773549729b541e6d3d626 (patch) | |
tree | 4f86564cb18ac211293538c629c949dc8a85f0c5 /net.c | |
parent | f8e378f27f2a8b99bf9be0a9168ba0ea19eeb740 (diff) | |
download | qemu-1d66f1709435c2c72e2773549729b541e6d3d626.zip qemu-1d66f1709435c2c72e2773549729b541e6d3d626.tar.gz qemu-1d66f1709435c2c72e2773549729b541e6d3d626.tar.bz2 |
Revert "net: Improve the warnings for dubious command line option combinations"
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 <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net.c')
-rw-r--r-- | net.c | 31 |
1 files changed, 0 insertions, 31 deletions
@@ -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) |