Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-4.16
libvirt-7.0.0
libvirt.17855c5ca01d283a3bcaceeff96971491e6a6b4...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libvirt.17855c5ca01d283a3bcaceeff96971491e6a6b44.patch of Package libvirt-7.0.0
From: Olaf Hering <olaf@aepfle.de> Date: Thu, 25 Mar 2021 17:26:02 +0100 Subject: 17855c5ca01d283a3bcaceeff96971491e6a6b44 libxl: add API wrapper for libxl_retrieve_domain_configuration Upcoming changes will use different LIBXL_API_VERSION variants. Prepare libxl_retrieve_domain_configuration, which got a new parameter "libxl_asyncop_how" in Xen 4.12. libvirt does not use this parameter. No functional change intended. Signed-off-by: Olaf Hering <olaf@aepfle.de> Reviewed-by: Jim Fehlig <jfehlig@suse.com> --- src/libxl/libxl_api_wrapper.h | 16 ++++++++++++++++ src/libxl/libxl_domain.c | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) --- a/src/libxl/libxl_api_wrapper.h +++ b/src/libxl/libxl_api_wrapper.h @@ -33,12 +33,28 @@ libxlDomainCreateRestoreWrapper(libxl_ctx *ctx, int ret; #if LIBXL_API_VERSION < 0x040700 ret = libxl_domain_create_restore(ctx, d_config, domid, restore_fd, params, NULL, aop_console_how); #else ret = libxl_domain_create_restore(ctx, d_config, domid, restore_fd, -1, params, NULL, aop_console_how); #endif return ret; } + +static inline int +libxlRetrieveDomainConfigurationWrapper(libxl_ctx *ctx, + uint32_t domid, + libxl_domain_config *d_config) +{ + int ret; + +#if LIBXL_API_VERSION < 0x041300 + ret = libxl_retrieve_domain_configuration(ctx, domid, d_config); +#else + ret = libxl_retrieve_domain_configuration(ctx, domid, d_config, NULL); +#endif + + return ret; +} --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -568,26 +568,26 @@ libxlDomainShutdownThread(void *opaque) libxlDomainShutdownHandleRestart(driver, vm); goto endjob; case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE: case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY: case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART: case VIR_DOMAIN_LIFECYCLE_ACTION_LAST: goto endjob; } #ifdef LIBXL_HAVE_SOFT_RESET } else if (xl_reason == LIBXL_SHUTDOWN_REASON_SOFT_RESET) { libxlDomainObjPrivatePtr priv = vm->privateData; - if (libxl_retrieve_domain_configuration(cfg->ctx, vm->def->id, - &d_config) != 0) { + if (libxlRetrieveDomainConfigurationWrapper(cfg->ctx, vm->def->id, + &d_config) != 0) { VIR_ERROR(_("Failed to retrieve config for VM '%s'. " "Unable to perform soft reset. Destroying VM"), vm->def->name); libxlDomainShutdownHandleDestroy(driver, vm); goto endjob; } if (priv->deathW) { libxl_evdisable_domain_death(cfg->ctx, priv->deathW); priv->deathW = NULL; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor