mirror of
https://github.com/mii443/qemu.git
synced 2025-08-31 03:19:27 +00:00
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>
This commit is contained in:
committed by
Anthony Liguori
parent
48042d861e
commit
49bd1458da
1
hw/pci.h
1
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);
|
||||
|
Reference in New Issue
Block a user