Revision 5607c388 hw/pci-hotplug.c

b/hw/pci-hotplug.c
33 33
#include "virtio-blk.h"
34 34

  
35 35
#if defined(TARGET_I386) || defined(TARGET_X86_64)
36
static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon, PCIBus *pci_bus,
37
                                       const char *opts)
36
static PCIDevice *qemu_pci_hot_add_nic(Monitor *mon, const char *opts)
38 37
{
39 38
    int ret;
40 39

  
41 40
    ret = net_client_init(mon, "nic", opts);
42 41
    if (ret < 0)
43 42
        return NULL;
44
    return pci_nic_init(pci_bus, &nd_table[ret], -1, "rtl8139");
43
    if (nd_table[ret].devaddr) {
44
        monitor_printf(mon, "Parameter addr not supported\n");
45
        return NULL;
46
    }
47
    return pci_nic_init(&nd_table[ret], "rtl8139", NULL);
45 48
}
46 49

  
47 50
void drive_hot_add(Monitor *mon, const char *pci_addr, const char *opts)
......
149 152
    }
150 153

  
151 154
    if (strcmp(type, "nic") == 0)
152
        dev = qemu_pci_hot_add_nic(mon, pci_bus, opts);
155
        dev = qemu_pci_hot_add_nic(mon, opts);
153 156
    else if (strcmp(type, "storage") == 0)
154 157
        dev = qemu_pci_hot_add_storage(mon, pci_bus, opts);
155 158
    else

Also available in: Unified diff