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@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
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;
+}
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;