From: Ian Campbell Subject: [PATCH] xl: print sxp on dry-run of create Date: Wed, 1 Jun 2011 13:51:48 +0100 Message-ID: <064a0d9f710a183928df.1306932708@cosworth.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Ian Campbell # Date 1306932694 -3600 # Node ID 064a0d9f710a183928df7b8fa25f66f202c96abb # Parent 8533cc275ece6d551c9d7b81e5fa4d9d24e03157 xl: print sxp on dry-run of create. The help text for xm create's --dry-run says "Dry run - prints the resulting configuration in SXP but does not create the domain." so update xl implementation to match. At least the xendomains initscript relies on this (for better or worse). Signed-off-by: Ian Campbell Tested-by: Carsten Schiers diff -r 8533cc275ece -r 064a0d9f710a tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Wed Jun 01 13:47:47 2011 +0100 +++ b/tools/libxl/xl_cmdimpl.c Wed Jun 01 13:51:34 2011 +0100 @@ -1503,10 +1503,6 @@ static int create_domain(struct domain_c parse_config_data(config_file, config_data, config_len, &d_config, &d_config.dm_info); - ret = 0; - if (dom_info->dryrun) - goto out; - if (migrate_fd >= 0) { if (d_config.c_info.name) { /* when we receive a domain we get its name from the config @@ -1525,9 +1521,13 @@ static int create_domain(struct domain_c } } - if (debug) + if (debug || dom_info->dryrun) printf_info(-1, &d_config, &d_config.dm_info); + ret = 0; + if (dom_info->dryrun) + goto out; + start: domid = -1;