diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-10-24 18:31:02 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-11-01 16:06:57 +0100 |
commit | 397d30e9401d2da96dbdf0ce49805d6d4bb68833 (patch) | |
tree | ddf7d8155ff00678ab56f7b00aa33e136a649d64 /stubs | |
parent | 9bc9732faeff09828fe38c0ebe2401ee131a6fca (diff) | |
download | qemu-397d30e9401d2da96dbdf0ce49805d6d4bb68833.zip qemu-397d30e9401d2da96dbdf0ce49805d6d4bb68833.tar.gz qemu-397d30e9401d2da96dbdf0ce49805d6d4bb68833.tar.bz2 |
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')
-rw-r--r-- | stubs/Makefile.objs | 2 | ||||
-rw-r--r-- | stubs/error-printf.c | 13 | ||||
-rw-r--r-- | stubs/mon-printf.c | 11 |
3 files changed, 14 insertions, 12 deletions
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index 7f236a7..2b5bb74 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -9,6 +9,7 @@ stub-obj-y += clock-warp.o stub-obj-y += cpu-get-clock.o stub-obj-y += cpu-get-icount.o stub-obj-y += dump.o +stub-obj-y += error-printf.o stub-obj-y += fdset-add-fd.o stub-obj-y += fdset-find-fd.o stub-obj-y += fdset-get-fd.o @@ -23,7 +24,6 @@ stub-obj-y += is-daemonized.o stub-obj-y += machine-init-done.o stub-obj-y += migr-blocker.o stub-obj-y += mon-is-qmp.o -stub-obj-y += mon-printf.o stub-obj-y += monitor-init.o stub-obj-y += notify-event.o stub-obj-y += qtest.o diff --git a/stubs/error-printf.c b/stubs/error-printf.c new file mode 100644 index 0000000..56379e6 --- /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); +} diff --git a/stubs/mon-printf.c b/stubs/mon-printf.c deleted file mode 100644 index e7c1e0c..0000000 --- a/stubs/mon-printf.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "qemu/osdep.h" -#include "qemu-common.h" -#include "monitor/monitor.h" - -void monitor_printf(Monitor *mon, const char *fmt, ...) -{ -} - -void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap) -{ -} |