Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LuraU-0005OQ-Fa for qemu-devel@nongnu.org; Fri, 17 Apr 2009 13:10:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LuraT-0005Nm-HK for qemu-devel@nongnu.org; Fri, 17 Apr 2009 13:10:49 -0400 Received: from [199.232.76.173] (port=55437 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LuraT-0005NX-9R for qemu-devel@nongnu.org; Fri, 17 Apr 2009 13:10:49 -0400 Received: from savannah.gnu.org ([199.232.41.3]:36457 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 1LuraS-0001vo-TB for qemu-devel@nongnu.org; Fri, 17 Apr 2009 13:10:49 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LuraS-0004hE-BK for qemu-devel@nongnu.org; Fri, 17 Apr 2009 17:10:48 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LuraS-0004hA-3O for qemu-devel@nongnu.org; Fri, 17 Apr 2009 17:10:48 +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 17:10:48 +0000 Subject: [Qemu-devel] [7145] 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: 7145 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7145 Author: aliguori Date: 2009-04-17 17:10:47 +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: -------------- trunk/hw/pci-hotplug.c Modified: trunk/hw/pci-hotplug.c =================================================================== --- trunk/hw/pci-hotplug.c 2009-04-17 17:10:43 UTC (rev 7144) +++ trunk/hw/pci-hotplug.c 2009-04-17 17:10:47 UTC (rev 7145) @@ -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(Monitor *mon, const char *pci_addr, const char *opts)