]> git.proxmox.com Git - mirror_qemu.git/commit - hw/pci/pci-hotplug-old.c
Fix pci_add storage not to exit on bad first argument
authorMarkus Armbruster <armbru@redhat.com>
Fri, 25 Sep 2009 01:53:49 +0000 (03:53 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 5 Oct 2009 14:32:53 +0000 (09:32 -0500)
commit49bd1458da8909434eb83c5cda472c63ff6a529c
tree85c55b21db44f91b06201d9c16911c3c946b5fab
parent48042d861e364c04d0431cc6f52594ea00267c80
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>
hw/pci-hotplug.c
hw/pci.c
hw/pci.h