summaryrefslogtreecommitdiff
path: root/hw/pci-hotplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pci-hotplug.c')
-rw-r--r--hw/pci-hotplug.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 4d49c29c42..e2b14caafa 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -33,15 +33,18 @@
#include "virtio-blk.h"
#if defined(TARGET_I386) || defined(TARGET_X86_64)
-static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon, PCIBus *pci_bus,
- const char *opts)
+static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon, const char *opts)
{
int ret;
ret = net_client_init(mon, "nic", opts);
if (ret < 0)
return NULL;
- return pci_nic_init(pci_bus, &nd_table[ret], -1, "rtl8139");
+ if (nd_table[ret].devaddr) {
+ monitor_printf(mon, "Parameter addr not supported\n");
+ return NULL;
+ }
+ return pci_nic_init(&nd_table[ret], "rtl8139", NULL);
}
void drive_hot_add(Monitor *mon, const char *pci_addr, const char *opts)
@@ -149,7 +152,7 @@ void pci_device_hot_add(Monitor *mon, const char *pci_addr, const char *type,
}
if (strcmp(type, "nic") == 0)
- dev = qemu_pci_hot_add_nic(mon, pci_bus, opts);
+ dev = qemu_pci_hot_add_nic(mon, opts);
else if (strcmp(type, "storage") == 0)
dev = qemu_pci_hot_add_storage(mon, pci_bus, opts);
else