#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)
}
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