summaryrefslogtreecommitdiff
path: root/stubs/error-printf.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-10-24 18:31:02 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2016-11-01 16:06:57 +0100
commit397d30e9401d2da96dbdf0ce49805d6d4bb68833 (patch)
treeddf7d8155ff00678ab56f7b00aa33e136a649d64 /stubs/error-printf.c
parent9bc9732faeff09828fe38c0ebe2401ee131a6fca (diff)
downloadqemu-397d30e9401d2da96dbdf0ce49805d6d4bb68833.tar.gz
qemu-error: remove dependency of stubs on monitor
Leave the implementation of error_vprintf and error_vprintf_unless_qmp (the latter now trivially wrapped by error_printf_unless_qmp) to libqemustub.a and monitor.c. This has two advantages: it lets us remove the monitor_printf and monitor_vprintf stubs, and it lets tests provide a different implementation of the functions that uses g_test_message. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1477326663-67817-2-git-send-email-pbonzini@redhat.com>
Diffstat (limited to 'stubs/error-printf.c')
-rw-r--r--stubs/error-printf.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/stubs/error-printf.c b/stubs/error-printf.c
new file mode 100644
index 0000000000..56379e648d
--- /dev/null
+++ b/stubs/error-printf.c
@@ -0,0 +1,13 @@
+#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "qemu/error-report.h"
+
+void error_vprintf(const char *fmt, va_list ap)
+{
+ vfprintf(stderr, fmt, ap);
+}
+
+void error_vprintf_unless_qmp(const char *fmt, va_list ap)
+{
+ error_vprintf(fmt, ap);
+}