From 397d30e9401d2da96dbdf0ce49805d6d4bb68833 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 24 Oct 2016 18:31:02 +0200 Subject: 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 Message-Id: <1477326663-67817-2-git-send-email-pbonzini@redhat.com> --- stubs/error-printf.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 stubs/error-printf.c (limited to 'stubs/error-printf.c') 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); +} -- cgit 1.4.1