From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LusSU-0005hN-8p for qemu-devel@nongnu.org; Fri, 17 Apr 2009 14:06:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LusSS-0005gi-S7 for qemu-devel@nongnu.org; Fri, 17 Apr 2009 14:06:37 -0400 Received: from [199.232.76.173] (port=60733 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LusSS-0005ga-CY for qemu-devel@nongnu.org; Fri, 17 Apr 2009 14:06:36 -0400 Received: from savannah.gnu.org ([199.232.41.3]:34155 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 1LusSR-0002hY-Ni for qemu-devel@nongnu.org; Fri, 17 Apr 2009 14:06:35 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LusSR-0004HV-6s for qemu-devel@nongnu.org; Fri, 17 Apr 2009 18:06:35 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LusSR-0004HH-00 for qemu-devel@nongnu.org; Fri, 17 Apr 2009 18:06:35 +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: Fri, 17 Apr 2009 18:06:35 +0000 Subject: [Qemu-devel] [7155] Don't fail PCI hotplug if no NIC model is supplied (Mark McLoughlin) 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: 7155 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7155 Author: aliguori Date: 2009-04-17 18:06:34 +0000 (Fri, 17 Apr 2009) Log Message: ----------- Don't fail PCI hotplug if no NIC model is supplied (Mark McLoughlin) It's perfectly fine to not supply a NIC model when adding a new NIC - we supply the default model to pci_nic_init() and it uses that if one wasn't explicitly supplied. Signed-off-by: Mark McLoughlin Signed-off-by: Anthony Liguori Modified Paths: -------------- branches/stable_0_10/hw/pci-hotplug.c Modified: branches/stable_0_10/hw/pci-hotplug.c =================================================================== --- branches/stable_0_10/hw/pci-hotplug.c 2009-04-17 18:06:31 UTC (rev 7154) +++ branches/stable_0_10/hw/pci-hotplug.c 2009-04-17 18:06:34 UTC (rev 7155) @@ -37,10 +37,10 @@ { int ret; - ret = net_client_init ("nic", opts); - if (ret < 0 || !nd_table[ret].model) + ret = net_client_init("nic", opts); + if (ret < 0) return NULL; - return pci_nic_init (pci_bus, &nd_table[ret], -1, "rtl8139"); + return pci_nic_init(pci_bus, &nd_table[ret], -1, "rtl8139"); } void drive_hot_add(const char *pci_addr, const char *opts)