libvirt/src/libxl
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
..
libvirtd_libxl.aug libxl: do not enable nested HVM unless global nested_hvm option enabled 2018-04-17 21:15:27 -06:00
libxl_capabilities.c Fix incorrect g_new0 conversions 2020-10-06 14:26:43 +02:00
libxl_capabilities.h src: add G_GNUC_NO_INLINE annotations for mocked symbols 2020-08-04 17:58:08 +01:00
libxl_conf.c conf: Add VIR_STORAGE_NET_PROTOCOL_NFS disk protocol type 2021-01-08 15:03:16 +01:00
libxl_conf.h Xen: Add support for qemu command-line passthrough 2020-08-25 10:11:08 -06:00
libxl_domain.c libxl: remove a now-unnecessary ret variable and cleanup: label. 2021-01-08 11:35:04 -05:00
libxl_domain.h Xen: Add support for qemu command-line passthrough 2020-08-25 10:11:08 -06:00
libxl_driver.c virpci.c: simplify virPCIDeviceNew() signature 2021-01-29 17:52:10 -03:00
libxl_driver.h src/libxl: use #pragma once in headers 2019-06-13 17:05:10 +02:00
libxl_logger.c util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
libxl_logger.h src/libxl: use #pragma once in headers 2019-06-13 17:05:10 +02:00
libxl_migration.c libxl: adopt to VIR_DRV_SUPPORTS_FEATURE return -1 2021-01-06 17:10:05 +03:00
libxl_migration.h src/libxl: use #pragma once in headers 2019-06-13 17:05:10 +02:00
libxl.conf libxl: do not enable nested HVM unless global nested_hvm option enabled 2018-04-17 21:15:27 -06:00
meson.build util: extract virStorageFile code into storage_source 2021-01-22 11:10:27 +01:00
test_libvirtd_libxl.aug.in build: use @CONFIG@ instead of ::CONFIG:: in augeas tests 2019-08-09 14:06:31 +01:00
virtxend.init.in configure: Provide OpenRC scripts for sub-daemons 2019-12-16 10:11:22 +01:00
virtxend.service.in systemd: Move timeout from service files to sysconf files 2020-04-03 11:50:50 +02:00
virtxend.sysconf systemd: Move timeout from service files to sysconf files 2020-04-03 11:50:50 +02:00
xen_common.c xen: recognize device_model_override 2020-12-07 15:38:31 -07:00
xen_common.h xenconfig: move contents to libxl driver and remove directory 2019-08-26 11:06:12 -06:00
xen_xl.c util: extract virStorageFile code into storage_source 2021-01-22 11:10:27 +01:00
xen_xl.h xenconfig: move contents to libxl driver and remove directory 2019-08-26 11:06:12 -06:00
xen_xm.c domain_conf: make virDomainDiskSetDriver() void 2020-11-11 12:53:11 +01:00
xen_xm.h xenconfig: move contents to libxl driver and remove directory 2019-08-26 11:06:12 -06:00
xenxs_private.h xenconfig: move contents to libxl driver and remove directory 2019-08-26 11:06:12 -06:00