# HG changeset patch # User Ian Campbell <ian.campbell@citrix.com> # 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 <ian.campbell@citrix.com> Tested-by: Carsten Schiers <carsten@schiers.de> 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; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Jun-02 16:36 UTC
Re: [Xen-devel] [PATCH] xl: print sxp on dry-run of create
Ian Campbell writes ("[Xen-devel] [PATCH] xl: print sxp on dry-run of create"):> xl: print sxp on dry-run of create.Right. I think xl restore should get a dry run option too.> 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).Presumably it wants to know the domain name which would be created, because that''s not necessarily related to the name of the config file.> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> > Tested-by: Carsten Schiers <carsten@schiers.de>Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel