From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH 09/27] tools/libxl: Pass restore_fd as a parameter to libxl__xc_domain_restore() Date: Mon, 15 Jun 2015 14:44:22 +0100 Message-ID: <1434375880-30914-10-git-send-email-andrew.cooper3@citrix.com> References: <1434375880-30914-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1434375880-30914-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Wei Liu , Yang Hongyang , Ian Jackson , Ian Campbell , Andrew Cooper List-Id: xen-devel@lists.xenproject.org If a conversion of a legacy stream is needed, libxl__xc_domain_restore() will need to use an fd other to the one found in the domain_create_state. No functional change. Signed-off-by: Andrew Cooper CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxl/libxl_create.c | 2 +- tools/libxl/libxl_internal.h | 1 + tools/libxl/libxl_save_callout.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 385891c..a37cdf8 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -1057,7 +1057,7 @@ static void domcreate_bootloader_done(libxl__egc *egc, rc = ERROR_INVAL; goto out; } - libxl__xc_domain_restore(egc, dcs, + libxl__xc_domain_restore(egc, dcs, restore_fd, hvm, pae, superpages); return; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 3fcc37a..101994f 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -3175,6 +3175,7 @@ _hidden int libxl__toolstack_save(uint32_t domid, uint8_t **buf, /* calls libxl__xc_domain_restore_done when done */ _hidden void libxl__xc_domain_restore(libxl__egc *egc, libxl__domain_create_state *dcs, + int restore_fd, int hvm, int pae, int superpages); /* If rc==0 then retval is the return value from xc_domain_save * and errnoval is the errno value it provided. diff --git a/tools/libxl/libxl_save_callout.c b/tools/libxl/libxl_save_callout.c index 71de297..0579372 100644 --- a/tools/libxl/libxl_save_callout.c +++ b/tools/libxl/libxl_save_callout.c @@ -41,13 +41,13 @@ static void helper_exited(libxl__egc *egc, libxl__ev_child *ch, /*----- entrypoints -----*/ void libxl__xc_domain_restore(libxl__egc *egc, libxl__domain_create_state *dcs, + int restore_fd, int hvm, int pae, int superpages) { STATE_AO_GC(dcs->ao); /* Convenience aliases */ const uint32_t domid = dcs->guest_domid; - const int restore_fd = dcs->restore_fd; libxl__domain_build_state *const state = &dcs->build_state; unsigned cbflags = libxl__srm_callout_enumcallbacks_restore -- 1.7.10.4