libvirt/src/node_device
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
..
meson.build remove HAL node device driver 2020-09-17 18:19:26 +02:00
node_device_driver.c node_device: pacify grumpy coverity due to addr override 2020-12-14 12:12:08 +01:00
node_device_driver.h remove HAL node device driver 2020-09-17 18:19:26 +02:00
node_device_udev.c virpci.c: simplify virPCIDeviceNew() signature 2021-01-29 17:52:10 -03:00
node_device_udev.h Revert "Also look for dmi information in /sys/class" 2020-10-02 13:56:46 +02:00
virtnodedevd.init.in configure: Provide OpenRC scripts for sub-daemons 2019-12-16 10:11:22 +01:00
virtnodedevd.service.in systemd: Move timeout from service files to sysconf files 2020-04-03 11:50:50 +02:00
virtnodedevd.sysconf systemd: Move timeout from service files to sysconf files 2020-04-03 11:50:50 +02:00