]> git.ipfire.org Git - thirdparty/libvirt.git/commit
pci: Fix failure paths in detach
authorJiri Denemark <jdenemar@redhat.com>
Thu, 16 Jan 2014 19:08:00 +0000 (20:08 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 20 Jan 2014 12:58:04 +0000 (13:58 +0100)
commitd8ab981bdd137f15675ee0d101abeabf42680cc1
treeeccd9762ba56fafe03878fd814571d942f6d6534
parentc982e5e84f47d3e71d794bb034ef2489091f41c6
pci: Fix failure paths in detach

https://bugzilla.redhat.com/show_bug.cgi?id=1046919

Since commit v0.9.0-47-g4e8969e (released in 0.9.1) some failures during
device detach were reported to callers of virPCIDeviceBindToStub as
success. For example, even though a device seemed to be detached

    virsh # nodedev-detach pci_0000_07_05_0 --driver vfio
    Device pci_0000_07_05_0 detached

one could find similar message in libvirt logs:

    Failed to bind PCI device '0000:07:05.0' to vfio-pci: No such device

This patch fixes these paths and also avoids overwriting real errors
with errors encountered during a cleanup phase.
src/util/virpci.c