summaryrefslogtreecommitdiff
path: root/qemu-error.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-error.c')
-rw-r--r--qemu-error.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/qemu-error.c b/qemu-error.c
index a8c178b332..5d5fe3742f 100644
--- a/qemu-error.c
+++ b/qemu-error.c
@@ -41,6 +41,17 @@ void error_printf(const char *fmt, ...)
va_end(ap);
}
+void error_printf_unless_qmp(const char *fmt, ...)
+{
+ va_list ap;
+
+ if (!monitor_cur_is_qmp()) {
+ va_start(ap, fmt);
+ error_vprintf(fmt, ap);
+ va_end(ap);
+ }
+}
+
static Location std_loc = {
.kind = LOC_NONE
};