aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-28 20:05:14 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-28 20:05:14 +0000
commitf441b28b8d10c18d9ca751c3bed2d80b7d607019 (patch)
tree0f02f8cf3f1502f8cc46033834041ad313787175
parenteda52953026a5b6d28b063af13101f1edb580dcf (diff)
downloadqemu-f441b28b8d10c18d9ca751c3bed2d80b7d607019.zip
qemu-f441b28b8d10c18d9ca751c3bed2d80b7d607019.tar.gz
qemu-f441b28b8d10c18d9ca751c3bed2d80b7d607019.tar.bz2
Do not try to use -net user as a default when slirp disabled (Jeremy Fitzhardinge)
When CONFIG_SLIRP is not defined, we should not try to use -net user as a default. Patch from Jeremy Fitzhardinge <jeremy@goop.org> (who is a Citrix staff member). Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5092 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--vl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index 245177a..8dc0708 100644
--- a/vl.c
+++ b/vl.c
@@ -8978,9 +8978,10 @@ int main(int argc, char **argv)
/* init network clients */
if (nb_net_clients == 0) {
/* if no clients, we use a default config */
- net_clients[0] = "nic";
- net_clients[1] = "user";
- nb_net_clients = 2;
+ net_clients[nb_net_clients++] = "nic";
+#ifdef CONFIG_SLIRP
+ net_clients[nb_net_clients++] = "user";
+#endif
}
for(i = 0;i < nb_net_clients; i++) {