xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
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	[thread overview]
Message-ID: <1435924125-20635-3-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1435924125-20635-1-git-send-email-ian.jackson@eu.citrix.com>

                            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 <Ian.Jackson@eu.citrix.com>
---
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

  parent reply	other threads:[~2015-07-03 11:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26 14:29 [PATCH] xl: Change output from xl -N create to be more useful Ian Jackson
2015-06-26 14:36 ` Ian Jackson
2015-06-26 15:10 ` Wei Liu
2015-06-26 15:30   ` Ian Jackson
2015-06-30 11:22     ` Ian Campbell
2015-07-03 11:10 ` Ian Jackson
2015-07-03 11:25 ` Ian Campbell
2015-07-03 11:31   ` Ian Jackson
2015-07-03 11:48     ` [PATCH 1/3] xl: Break out flush_stream Ian Jackson
2015-07-03 11:48       ` [PATCH 2/3] xl: Change output from xl -N create to be more useful Ian Jackson
2015-07-03 13:44         ` [PATCH 2/3] xl: Change output from xl -N create to be more useful [and 1 more messages] Ian Jackson
2015-07-03 11:48       ` Ian Jackson [this message]
2015-07-03 12:06       ` [PATCH 1/3] xl: Break out flush_stream Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435924125-20635-3-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).