]> git.ipfire.org Git - thirdparty/libvirt.git/commit
pci: Make reattach work for unbound devices
authorJiri Denemark <jdenemar@redhat.com>
Wed, 15 Jan 2014 10:44:53 +0000 (11:44 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 20 Jan 2014 12:58:04 +0000 (13:58 +0100)
commitc982e5e84f47d3e71d794bb034ef2489091f41c6
tree0a5b6c619cd1a1e428c43ecc91ea1efdfa7f8664
parent0728d4721b982adec653d9eb2031f902d6f476e2
pci: Make reattach work for unbound devices

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

When a PCI device is not bound to any driver, reattach should just
trigger driver probe rather than failing with

    Invalid device 0000:00:19.0 driver file
    /sys/bus/pci/devices/0000:00:19.0/driver is not a symlink

While virPCIDeviceGetDriverPathAndName was documented to return success
and NULL driver and path when a device is not attached to any driver but
didn't do so. Thus callers could not distinguish unbound devices from
failures.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/util/virpci.c