summaryrefslogtreecommitdiffstats
path: root/hw/pci.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2009-09-25 03:53:49 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:53 -0500
commit49bd1458da8909434eb83c5cda472c63ff6a529c (patch)
tree85c55b21db44f91b06201d9c16911c3c946b5fab /hw/pci.h
parent48042d861e364c04d0431cc6f52594ea00267c80 (diff)
downloadhqemu-49bd1458da8909434eb83c5cda472c63ff6a529c.zip
hqemu-49bd1458da8909434eb83c5cda472c63ff6a529c.tar.gz
Fix pci_add storage not to exit on bad first argument
Monitor command "pci_add ADDR storage ..." does its work in qemu_pci_hot_add_nic(). It called pci_create(..., ADDR) to create the device. That's wrong, because pci_create() terminates the program when ADDR is invalid. Use pci_get_bus_devfn() and pci_create_noinit() instead. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci.h')
-rw-r--r--hw/pci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/pci.h b/hw/pci.h
index f3a034b..76dfa0a 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -262,6 +262,7 @@ int pci_bus_num(PCIBus *s);
void pci_for_each_device(int bus_num, void (*fn)(PCIDevice *d));
PCIBus *pci_find_bus(int bus_num);
PCIDevice *pci_find_device(int bus_num, int slot, int function);
+PCIBus *pci_get_bus_devfn(int *devfnp, const char *devaddr);
int pci_read_devaddr(Monitor *mon, const char *addr, int *domp, int *busp,
unsigned *slotp);
OpenPOWER on IntegriCloud