mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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>
This commit is contained in:
parent
f2332e8f78
commit
17855c5ca0
@ -42,3 +42,19 @@ libxlDomainCreateRestoreWrapper(libxl_ctx *ctx,
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -572,8 +572,8 @@ libxlDomainShutdownThread(void *opaque)
|
||||
} 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user