Commit f441b28b8d10c18d9ca751c3bed2d80b7d607019

Authored by aliguori
1 parent eda52953

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
Showing 1 changed file with 4 additions and 3 deletions
... ... @@ -8978,9 +8978,10 @@ int main(int argc, char **argv)
8978 8978 /* init network clients */
8979 8979 if (nb_net_clients == 0) {
8980 8980 /* if no clients, we use a default config */
8981   - net_clients[0] = "nic";
8982   - net_clients[1] = "user";
8983   - nb_net_clients = 2;
  8981 + net_clients[nb_net_clients++] = "nic";
  8982 +#ifdef CONFIG_SLIRP
  8983 + net_clients[nb_net_clients++] = "user";
  8984 +#endif
8984 8985 }
8985 8986  
8986 8987 for(i = 0;i < nb_net_clients; i++) {
... ...