Revision e075e788 hw/pci-hotplug.c

b/hw/pci-hotplug.c
124 124
        if (pci_read_devaddr(mon, pci_addr, &dom, &pci_bus, &slot)) {
125 125
            goto err;
126 126
        }
127
        dev = pci_find_device(pci_find_root_bus(0), pci_bus, slot, 0);
127
        dev = pci_find_device(pci_find_root_bus(dom), pci_bus, slot, 0);
128 128
        if (!dev) {
129 129
            monitor_printf(mon, "no pci device with address %s\n", pci_addr);
130 130
            goto err;
......
252 252

  
253 253
    if (dev) {
254 254
        monitor_printf(mon, "OK domain %d, bus %d, slot %d, function %d\n",
255
                       0, pci_bus_num(dev->bus), PCI_SLOT(dev->devfn),
255
                       pci_find_domain(dev->bus),
256
                       pci_bus_num(dev->bus), PCI_SLOT(dev->devfn),
256 257
                       PCI_FUNC(dev->devfn));
257 258
    } else
258 259
        monitor_printf(mon, "failed to add %s\n", opts);
......
269 270
        return -1;
270 271
    }
271 272

  
272
    d = pci_find_device(pci_find_root_bus(0), bus, slot, 0);
273
    d = pci_find_device(pci_find_root_bus(dom), bus, slot, 0);
273 274
    if (!d) {
274 275
        monitor_printf(mon, "slot %d empty\n", slot);
275 276
        return -1;

Also available in: Unified diff