mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
libxl: add API wrapper for libxl_domain_reboot
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>
This commit is contained in:
parent
f8a890a6a4
commit
439942f395
@ -72,3 +72,17 @@ libxlDomainShutdownWrapper(libxl_ctx *ctx, uint32_t domid)
|
|||||||
|
|
||||||
return ret;
|
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;
|
||||||
|
}
|
||||||
|
@ -1356,7 +1356,7 @@ libxlDomainReboot(virDomainPtr dom, unsigned int flags)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (flags & VIR_DOMAIN_REBOOT_PARAVIRT) {
|
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)
|
if (ret == 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user