From 49bd1458da8909434eb83c5cda472c63ff6a529c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 25 Sep 2009 03:53:49 +0200 Subject: 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 Signed-off-by: Anthony Liguori --- hw/pci.h | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/pci.h') diff --git a/hw/pci.h b/hw/pci.h index f3a034b356..76dfa0a9bd 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); -- cgit v1.2.3-55-g7522