Upcoming changes will use different LIBXL_API_VERSION variants.
Prepare libxl_domain_reboot, 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_wrapper.h | 14 ++++++++++++++
src/libxl/libxl_driver.c | 2 +-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/libxl/libxl_api_wrapper.h b/src/libxl/libxl_api_wrapper.h
index 8b25c3fc9e..6744ba7db3 100644
--- a/src/libxl/libxl_api_wrapper.h
+++ b/src/libxl/libxl_api_wrapper.h
@@ -72,3 +72,17 @@ libxlDomainShutdownWrapper(libxl_ctx *ctx, uint32_t domid)
return ret;
}
+
+static inline int
+libxlDomainRebootWrapper(libxl_ctx *ctx, uint32_t domid)
+{
+ int ret;
+
+#if LIBXL_API_VERSION < 0x041300
+ ret = libxl_domain_reboot(ctx, domid);
+#else
+ ret = libxl_domain_reboot(ctx, domid, NULL);
+#endif
+
+ return ret;
+}
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index d5e53154de..cad008c1f5 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -1356,7 +1356,7 @@ libxlDomainReboot(virDomainPtr dom, unsigned int flags)
goto cleanup;
if (flags & VIR_DOMAIN_REBOOT_PARAVIRT) {
- ret = libxl_domain_reboot(cfg->ctx, vm->def->id);
+ ret = libxlDomainRebootWrapper(cfg->ctx, vm->def->id);
if (ret == 0)
goto cleanup;