All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-4.5 v2] xl: print message to stdout when (!debug && dryrun)
@ 2014-12-15 10:56 Wei Liu
  2014-12-15 11:06 ` Ian Campbell
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2014-12-15 10:56 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, ian.campbell, m.a.young

In commit d36a3734a ("xl: fix migration failure with xl migrate
--debug"), message is printed to stderr for both debug mode
and dryrun mode. That caused rdname() in xendomains fails to parse
domain name since it's expecting input from xl's stdout.

So this patch separates those two cases. If xl is running in debug mode,
then message is printed to stderr; if xl is running in dryrun mode and
debug is not enabled, message is printed to stdout. This will fix
xendomains and other scripts that use "xl create --dryrun", as well as
not re-introducing the old bug fixed in d36a3734a.

Reported-by: Mark Pryor <tlviewer@yahoo.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: M A Young <m.a.young@durham.ac.uk>
Cc: Ian Campbell <ian.campbell@citrix.com>
Release-Acked-by: Konrad Wilk <konrad.wilk@oracle.com>
---
 tools/libxl/xl_cmdimpl.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 3737c7e..ed0d478 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -2473,7 +2473,8 @@ static uint32_t create_domain(struct domain_create *dom_info)
     }
 
     if (debug || dom_info->dryrun)
-        printf_info(default_output_format, -1, &d_config, stderr);
+        printf_info(default_output_format, -1, &d_config,
+                    debug ? stderr : stdout);
 
     ret = 0;
     if (dom_info->dryrun)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH for-4.5 v2] xl: print message to stdout when (!debug && dryrun)
  2014-12-15 10:56 [PATCH for-4.5 v2] xl: print message to stdout when (!debug && dryrun) Wei Liu
@ 2014-12-15 11:06 ` Ian Campbell
  2014-12-16 17:17   ` Ian Campbell
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Campbell @ 2014-12-15 11:06 UTC (permalink / raw)
  To: Wei Liu; +Cc: m.a.young, xen-devel

On Mon, 2014-12-15 at 10:56 +0000, Wei Liu wrote:
> In commit d36a3734a ("xl: fix migration failure with xl migrate
> --debug"), message is printed to stderr for both debug mode
> and dryrun mode. That caused rdname() in xendomains fails to parse
> domain name since it's expecting input from xl's stdout.
> 
> So this patch separates those two cases. If xl is running in debug mode,
> then message is printed to stderr; if xl is running in dryrun mode and
> debug is not enabled, message is printed to stdout. This will fix
> xendomains and other scripts that use "xl create --dryrun", as well as
> not re-introducing the old bug fixed in d36a3734a.
> 
> Reported-by: Mark Pryor <tlviewer@yahoo.com>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: M A Young <m.a.young@durham.ac.uk>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Release-Acked-by: Konrad Wilk <konrad.wilk@oracle.com>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH for-4.5 v2] xl: print message to stdout when (!debug && dryrun)
  2014-12-15 11:06 ` Ian Campbell
@ 2014-12-16 17:17   ` Ian Campbell
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2014-12-16 17:17 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, m.a.young

On Mon, 2014-12-15 at 11:06 +0000, Ian Campbell wrote:

> > Release-Acked-by: Konrad Wilk <konrad.wilk@oracle.com>
> 
> Acked-by: Ian Campbell <ian.campbell@citrix.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-16 17:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-15 10:56 [PATCH for-4.5 v2] xl: print message to stdout when (!debug && dryrun) Wei Liu
2014-12-15 11:06 ` Ian Campbell
2014-12-16 17:17   ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.