libvirt/src/libxl
Daniel Henrique Barboza 887dd0d331 qemu, libxl, hypervisor: use virDomainDriverNodeDeviceDetachFlags() helper
libxlNodeDeviceDetachFlags() and qemuNodeDeviceDetachFlags() are mostly
equal, aside from how the virHostdevmanager pointer is retrieved and
the PCI stub driver used.

Now that the PCI stub driver verification is done early in both functions,
we can use the virDomainDriverNodeDeviceDetachFlags() helper to reduce
code duplication between them. 'driverName' is checked inside the helper
to set the appropriate stub driver.

The helper is named with the 'Flags' suffix, even when the helper itself
isn't receiving the flags from the callers, to be compliant with the
ACL function virNodeDeviceDetachFlagsEnsureACL() that is being called
inside it and was called from the original functions. Renaming the helper
would implicate in renaming REMOTE_PROC_NODE_DEVICE_DETACH_FLAGS, and all the
related structs inside remote_protocol.x, to be compliant with the ACL
rules.

This is not being checked at this moment, but we'll fix check-aclrules.py to
verify all the helpers that calls ACL functions in domain_driver.c shortly.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2021-02-17 15:56:27 -03:00
..
libvirtd_libxl.aug
libxl_capabilities.c libxl: Use g_autofree for char* where easily possible 2021-02-17 10:25:53 -07:00
libxl_capabilities.h
libxl_conf.c Replace virStringSplit with g_strsplit 2021-02-11 17:05:34 +01:00
libxl_conf.h
libxl_domain.c libxl: Use g_autofree for char* where easily possible 2021-02-17 10:25:53 -07:00
libxl_domain.h
libxl_driver.c qemu, libxl, hypervisor: use virDomainDriverNodeDeviceDetachFlags() helper 2021-02-17 15:56:27 -03:00
libxl_driver.h
libxl_logger.c libxl: Use g_autofree for char* where easily possible 2021-02-17 10:25:53 -07:00
libxl_logger.h
libxl_migration.c libxl: Use g_autofree for char* where easily possible 2021-02-17 10:25:53 -07:00
libxl_migration.h
libxl.conf
meson.build build: Remove unused 'conflicts' key from virt_daemon_unit 2021-02-10 09:30:41 -07:00
test_libvirtd_libxl.aug.in
virtxend.init.in
virtxend.service.in
virtxend.sysconf
xen_common.c libxl: Use g_autofree for char* where easily possible 2021-02-17 10:25:53 -07:00
xen_common.h
xen_xl.c libxl: Use g_autofree for char* where easily possible 2021-02-17 10:25:53 -07:00
xen_xl.h
xen_xm.c
xen_xm.h
xenxs_private.h