mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-31 14:23:53 -06: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:
parent
48042d861e
commit
49bd1458da
3 changed files with 12 additions and 3 deletions
2
hw/pci.c
2
hw/pci.c
|
@ -317,7 +317,7 @@ int pci_read_devaddr(Monitor *mon, const char *addr, int *domp, int *busp,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static PCIBus *pci_get_bus_devfn(int *devfnp, const char *devaddr)
|
||||
PCIBus *pci_get_bus_devfn(int *devfnp, const char *devaddr)
|
||||
{
|
||||
int dom, bus;
|
||||
unsigned slot;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue