diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-17 17:10:47 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-17 17:10:47 +0000 |
commit | eefb4091d29d8a32f02e004d50028201926d23f0 (patch) | |
tree | fad71614f303b641dc4048f93998e0ea139212af /hw | |
parent | 771f133989ae75f7a0c00731326e7a02cef643b0 (diff) |
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 <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7145 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r-- | hw/pci-hotplug.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c index d968a14ec3..603d74d1e5 100644 --- a/hw/pci-hotplug.c +++ b/hw/pci-hotplug.c @@ -37,10 +37,10 @@ static PCIDevice *qemu_pci_hot_add_nic(PCIBus *pci_bus, const char *opts) { 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) |