Upcoming changes will use different LIBXL_API_VERSION variants.
Prepare libxl_domain_pause, which got a new parameter
"ao_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 | 14 ++++++++++++++
src/libxl/libxl_driver.c | 4 ++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/libxl/libxl_api.h b/src/libxl/libxl_api.h
index 1f09f3f888..947e0c8d47 100644
--- a/src/libxl/libxl_api.h
+++ b/src/libxl/libxl_api.h
@@ -86,3 +86,17 @@ Libxl_Domain_Reboot(libxl_ctx *ctx, uint32_t domid)
return ret;
}
+
+static inline int
+Libxl_Domain_Pause(libxl_ctx *ctx, uint32_t domid)
+{
+ int ret;
+
+#if LIBXL_API_VERSION < 0x041300
+ ret = libxl_domain_pause(ctx, domid);
+#else
+ ret = libxl_domain_pause(ctx, domid, NULL);
+#endif
+
+ return ret;
+}
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 1811df8acf..929e8195f0 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -1185,7 +1185,7 @@ libxlDomainSuspend(virDomainPtr dom)
goto endjob;
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_PAUSED) {
- if (libxl_domain_pause(cfg->ctx, vm->def->id) != 0) {
+ if (Libxl_Domain_Pause(cfg->ctx, vm->def->id) != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to suspend domain '%d' with
libxenlight"),
vm->def->id);
@@ -2048,7 +2048,7 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to, unsigned int
flags)
if (!(flags & VIR_DUMP_LIVE) &&
virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) {
- if (libxl_domain_pause(cfg->ctx, vm->def->id) != 0) {
+ if (Libxl_Domain_Pause(cfg->ctx, vm->def->id) != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Before dumping core, failed to suspend domain
'%d'"
" with libxenlight"),