libvirt/src/hypervisor
Daniel Henrique Barboza b0264e9404 virpci.c: simplify virPCIDeviceNew() signature
The current virPCIDeviceNew() signature, receiving 4 uints in sequence
(domain, bus, slot, function), is not neat.

We already have a way to represent a PCI address in virPCIDeviceAddress
that is used in the code. Aside from the test files, most of
virPCIDeviceNew() callers have access to a virPCIDeviceAddress reference,
but then we need to retrieve the 4 required uints (addr.domain, addr.bus,
addr.slot, addr.function) to satisfy virPCIDeviceNew(). The result is
that we have extra verbosity/boilerplate to retrieve an information that
is already available in virPCIDeviceAddress.

A better way is presented by virNVMEDeviceNew(), where the caller just
supplies a virPCIDeviceAddress pointer and the function handles the
details internally.

This patch changes virPCIDeviceNew() to receive a virPCIDeviceAddress
pointer instead of 4 uints.

Reviewed-by: Laine Stump <laine@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2021-01-29 17:52:10 -03:00
..
domain_cgroup.c virsh: include virutil.h where used 2020-02-24 23:15:50 +01:00
domain_cgroup.h domain_cgroup.c: add virDomainCgroupSetMemoryLimitParameters() 2020-02-23 14:02:24 +01:00
domain_driver.c domain_driver.c: use PCI address with virDomainDriverNodeDeviceGetPCIInfo() 2021-01-29 17:51:03 -03:00
domain_driver.h domain_driver.c: use PCI address with virDomainDriverNodeDeviceGetPCIInfo() 2021-01-29 17:51:03 -03:00
meson.build meson: src: build libvirt.so library 2020-08-03 09:27:04 +02:00
virclosecallbacks.c util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
virclosecallbacks.h virclosecallbacks: move to src/hypervisor 2020-02-24 16:47:21 +01:00
virhostdev.c virpci.c: simplify virPCIDeviceNew() signature 2021-01-29 17:52:10 -03:00
virhostdev.h virhostdev: move to src/hypervisor 2020-02-24 16:47:21 +01:00