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@xxxxxxxxx> --- src/libxl/libxl_api.h | 14 ++++++++++++++ src/libxl/libxl_driver.c | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/libxl/libxl_api.h b/src/libxl/libxl_api.h index 9a3dcba60c..1f09f3f888 100644 --- a/src/libxl/libxl_api.h +++ b/src/libxl/libxl_api.h @@ -72,3 +72,17 @@ Libxl_Domain_Shutdown(libxl_ctx *ctx, uint32_t domid) return ret; } + +static inline int +Libxl_Domain_Reboot(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 93db26903c..1811df8acf 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 = Libxl_Domain_Reboot(cfg->ctx, vm->def->id); if (ret == 0) goto cleanup;