Skip to content

Commit

Permalink
error: Print error_report() to stderr if using qmp
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Markus Armbruster <[email protected]>
Signed-off-by: Cole Robinson <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
crobinso authored and Luiz Capitulino committed Apr 25, 2014
1 parent 4a66d3b commit 4ad417b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/qemu-error.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 4ad417b

Please sign in to comment.