From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KYnkC-0002aN-54 for qemu-devel@nongnu.org; Thu, 28 Aug 2008 16:05:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KYnkA-0002Zd-4I for qemu-devel@nongnu.org; Thu, 28 Aug 2008 16:05:23 -0400 Received: from [199.232.76.173] (port=54402 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KYnk9-0002ZZ-VN for qemu-devel@nongnu.org; Thu, 28 Aug 2008 16:05:22 -0400 Received: from savannah.gnu.org ([199.232.41.3]:59103 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KYnk8-0000Z6-AK for qemu-devel@nongnu.org; Thu, 28 Aug 2008 16:05:21 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KYnk3-0008Nw-Pp for qemu-devel@nongnu.org; Thu, 28 Aug 2008 20:05:15 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KYnk3-0008Ns-EH for qemu-devel@nongnu.org; Thu, 28 Aug 2008 20:05:15 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Thu, 28 Aug 2008 20:05:15 +0000 Subject: [Qemu-devel] [5092] Do not try to use -net user as a default when slirp disabled ( Jeremy Fitzhardinge) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5092 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5092 Author: aliguori Date: 2008-08-28 20:05:14 +0000 (Thu, 28 Aug 2008) Log Message: ----------- 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 (who is a Citrix staff member). Signed-off-by: Ian Jackson Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/vl.c Modified: trunk/vl.c =================================================================== --- trunk/vl.c 2008-08-27 19:19:44 UTC (rev 5091) +++ trunk/vl.c 2008-08-28 20:05:14 UTC (rev 5092) @@ -8978,9 +8978,10 @@ /* 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++) {