return ret;
}
+
+static inline int
+libxlDomainPauseWrapper(libxl_ctx *ctx, uint32_t domid)
+{
+ int ret;
+
+#if LIBXL_API_VERSION < 0x041300
+ ret = libxl_domain_pause(ctx, domid);
+#else
+ ret = libxl_domain_pause(ctx, domid, NULL);
+#endif
+
+ return ret;
+}
goto endjob;
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_PAUSED) {
- if (libxl_domain_pause(cfg->ctx, vm->def->id) != 0) {
+ if (libxlDomainPauseWrapper(cfg->ctx, vm->def->id) != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to suspend domain '%d' with libxenlight"),
vm->def->id);
if (!(flags & VIR_DUMP_LIVE) &&
virDomainObjGetState(vm, NULL) == VIR_DOMAIN_RUNNING) {
- if (libxl_domain_pause(cfg->ctx, vm->def->id) != 0) {
+ if (libxlDomainPauseWrapper(cfg->ctx, vm->def->id) != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Before dumping core, failed to suspend domain '%d'"
" with libxenlight"),