]> xenbits.xensource.com Git - libvirt.git/commitdiff
libxl: libxl_domain_create_restore has an extra argument
authorWei Liu <wei.liu2@citrix.com>
Tue, 5 Apr 2016 14:20:12 +0000 (15:20 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 7 Apr 2016 16:34:23 +0000 (17:34 +0100)
In the latest libxenlight code, libxl_domain_create_restore accepts a
new argument. Update libvirt's libxl driver for that. Use the macro
provided by libxenlight to detect which version should be used.

The new parameter (send_back_fd) is set to -1 because libvirt provides
no such fd.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Message-id: 1459866012-27081-1-git-send-email-wei.liu2@citrix.com

src/libxl/libxl_domain.c

index 04962a01e20fa87a71296c28aadf57016423834e..aed904b7917ac0cda84396436a65ab88d7d6bbdc 100644 (file)
@@ -1070,7 +1070,12 @@ libxlDomainStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
         ret = libxl_domain_create_new(cfg->ctx, &d_config,
                                       &domid, NULL, &aop_console_how);
     } else {
-#ifdef LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS
+#if defined(LIBXL_HAVE_DOMAIN_CREATE_RESTORE_SEND_BACK_FD)
+        params.checkpointed_stream = 0;
+        ret = libxl_domain_create_restore(cfg->ctx, &d_config, &domid,
+                                          restore_fd, -1, &params, NULL,
+                                          &aop_console_how);
+#elif defined(LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS)
         params.checkpointed_stream = 0;
         ret = libxl_domain_create_restore(cfg->ctx, &d_config, &domid,
                                           restore_fd, &params, NULL,