From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH 02/29] tools/[lib]xl: Correct use of init/dispose for libxl_domain_restore_params Date: Wed, 10 Sep 2014 18:10:40 +0100 Message-ID: <1410369067-1330-3-git-send-email-andrew.cooper3@citrix.com> References: <1410369067-1330-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: <1410369067-1330-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: Andrew Cooper , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Signed-off-by: Andrew Cooper CC: Ian Campbell CC: Ian Jackson --- tools/libxl/libxl.h | 9 +++++++-- tools/libxl/xl_cmdimpl.c | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index dab3a67..5136d02 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -847,10 +847,15 @@ int static inline libxl_domain_create_restore_0x040200( LIBXL_EXTERNAL_CALLERS_ONLY { libxl_domain_restore_params params; - params.checkpointed_stream = 0; + int ret; - return libxl_domain_create_restore( + libxl_domain_restore_params_init(¶ms); + + ret = libxl_domain_create_restore( ctx, d_config, domid, restore_fd, ¶ms, ao_how, aop_console_how); + + libxl_domain_restore_params_dispose(¶ms); + return ret; } #define libxl_domain_create_restore libxl_domain_create_restore_0x040200 diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 8a38077..26492fc 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -2246,11 +2246,17 @@ start: if ( restoring ) { libxl_domain_restore_params params; + + libxl_domain_restore_params_init(¶ms); + params.checkpointed_stream = dom_info->checkpointed_stream; ret = libxl_domain_create_restore(ctx, &d_config, &domid, restore_fd, ¶ms, 0, autoconnect_console_how); + + libxl_domain_restore_params_dispose(¶ms); + /* * On subsequent reboot etc we should create the domain, not * restore/migrate-receive it again. -- 1.7.10.4