mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-31 05:57:16 +00:00
libxl: add API wrapper for libxl_send_trigger
Upcoming changes will use different LIBXL_API_VERSION variants. Prepare libxl_send_trigger, 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
06393ff7d3
commit
4d6e2c0f89
@ -171,3 +171,20 @@ libxlSetVcpuonlineWrapper(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int
|
||||
libxlSendTriggerWrapper(libxl_ctx *ctx,
|
||||
uint32_t domid,
|
||||
libxl_trigger trigger,
|
||||
uint32_t vcpuid)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#if LIBXL_API_VERSION < 0x041300
|
||||
ret = libxl_send_trigger(ctx, domid, trigger, vcpuid);
|
||||
#else
|
||||
ret = libxl_send_trigger(ctx, domid, trigger, vcpuid, NULL);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1308,8 +1308,8 @@ libxlDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
|
||||
}
|
||||
|
||||
if (flags & VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN) {
|
||||
ret = libxl_send_trigger(cfg->ctx, vm->def->id,
|
||||
LIBXL_TRIGGER_POWER, 0);
|
||||
ret = libxlSendTriggerWrapper(cfg->ctx, vm->def->id,
|
||||
LIBXL_TRIGGER_POWER, 0);
|
||||
if (ret == 0)
|
||||
goto cleanup;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user