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(a)aepfle.de>
---
src/libxl/libxl_api.h | 16 ++++++++++++++++
src/libxl/libxl_domain.c | 2 +-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/libxl/libxl_api.h b/src/libxl/libxl_api.h
index 64ccd7a428..e985e6d302 100644
--- a/src/libxl/libxl_api.h
+++ b/src/libxl/libxl_api.h
@@ -42,3 +42,19 @@ Libxl_Domain_Create_Restore(libxl_ctx *ctx,
return ret;
}
+
+static inline int
+Libxl_Retrieve_Domain_Configuration(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;
+}
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index 2fe1d34e19..d970a05f3a 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -572,7 +572,7 @@ 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,
+ if (Libxl_Retrieve_Domain_Configuration(cfg->ctx, vm->def->id,
&d_config) != 0) {
VIR_ERROR(_("Failed to retrieve config for VM '%s'. "
"Unable to perform soft reset. Destroying VM"),