]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virpci.c: use virPCIDeviceAddressPtr in virPCIDeviceListFindIndex()
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Mon, 4 Jan 2021 12:54:40 +0000 (09:54 -0300)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Mon, 1 Mar 2021 15:25:33 +0000 (12:25 -0300)
commitd7d1479fc0f0797f808cf8c28af8252874c429c5
tree58f22c7052481e578d09922145cd3336cb02c133
parent67357e5094f662e6a943d421b2d7dcd494785c08
virpci.c: use virPCIDeviceAddressPtr in virPCIDeviceListFindIndex()

We're going to need a way to remove a PCI Device from a list without having
a valid virPCIDevicePtr, because the device is missing from the host. This
means that virPCIDevicesListDel() must operate with a PCI Device address
instead.

Turns out that virPCIDevicesListDel() and its related functions only use
the virPCIDeviceAddressPtr of the virPCIDevicePtr, so this change is
simple to do and will not cause hassle in all other callers. Let's
start adapting virPCIDeviceListFindIndex() and crawl our way up to
virPCIDevicesListDel().

Reviewed-by: Laine Stump <laine@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/util/virpci.c
src/util/virpci.h