]> git.ipfire.org Git - thirdparty/libvirt.git/commit
hostdev: Mark PCI devices as inactive as they're detached
authorAndrea Bolognani <abologna@redhat.com>
Thu, 17 Dec 2015 10:54:14 +0000 (11:54 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 21 Dec 2015 10:21:00 +0000 (11:21 +0100)
commitb8a625f3847c72799ff1558c246de30c76f6956a
tree5cdd3a56cae4c036d5fb96022733d46fc1dcb69a
parent6d9cdd2a57f712c477e3b1fc2c5d4ab5a963756e
hostdev: Mark PCI devices as inactive as they're detached

We want to eventually factor out the code dealing with device detaching
and reattaching, so that we can share it and make sure it's called eg.
when 'virsh nodedev-detach' is used.

For that to happen, it's important that the lists of active and inactive
PCI devices are updated every time a device changes its state.

Instead of passing NULL as the last argument of virPCIDeviceDetach() and
virPCIDeviceReattach(), pass the proper list so that it can be updated.
src/util/virhostdev.c