From: Cole Robinson Date: Fri, 21 Mar 2014 23:42:24 +0000 (-0400) Subject: error: Print error_report() to stderr if using qmp X-Git-Tag: v2.1.0-rc0~161^2~11 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4ad417baa43424b6b988c52b83989fd95670c113;p=qemu-xen-unstable.git error: Print error_report() to stderr if using qmp monitor_printf will drop the requested output if cur_mon is qmp (for good reason). However these messages are often helpful for debugging issues with via libvirt. If we know the message won't hit the monitor, send it to stderr. Cc: Luiz Capitulino Cc: Markus Armbruster Signed-off-by: Cole Robinson Reviewed-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- diff --git a/util/qemu-error.c b/util/qemu-error.c index 80df49a874..7b167fd06b 100644 --- a/util/qemu-error.c +++ b/util/qemu-error.c @@ -20,7 +20,7 @@ */ void error_vprintf(const char *fmt, va_list ap) { - if (cur_mon) { + if (cur_mon && !monitor_cur_is_qmp()) { monitor_vprintf(cur_mon, fmt, ap); } else { vfprintf(stderr, fmt, ap);