From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [PATCH 3/3] xl: xl -N create -d sends json output to stdout, not stderr Date: Fri, 3 Jul 2015 12:48:45 +0100 Message-ID: <1435924125-20635-3-git-send-email-ian.jackson@eu.citrix.com> References: <21910.29314.679455.196969@mariner.uk.xensource.com> <1435924125-20635-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1435924125-20635-1-git-send-email-ian.jackson@eu.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@lists.xensource.com Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org domain config output goes to before after xl create nowhere nowhere xl create -d stderr stderr xl -N create stdout stdout xl -N create -d stderr stdout It is not sensible that adding -d would cause different output on stdout. And that -N would produce less debug output is hardly surprising in general and not really a problem in this case. Signed-off-by: Ian Jackson --- v2: New patch in this version of the mini-series. --- tools/libxl/xl_cmdimpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 50247de..1be3f8b 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -2696,7 +2696,7 @@ static uint32_t create_domain(struct domain_create *dom_info) } if (debug || dom_info->dryrun) { - FILE *cfg_print_fh = debug ? stderr : stdout; + FILE *cfg_print_fh = (debug && !dom_info->dryrun) ? stderr : stdout; if (default_output_format == OUTPUT_FORMAT_SXP) { printf_info_sexp(-1, &d_config, cfg_print_fh); } else { -- 1.7.10.4