From ca76a66975f018c323cb609c0c55a4c8d4acde3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 11 Oct 2019 16:34:05 +0100 Subject: plugin: add qemu_plugin_outs helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Having the plugins grab stdout and spew stuff there is a bit ugly and certainly makes the tests look ugly. Provide a hook back into QEMU which can be redirected as needed. Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay --- plugins/api.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins/api.c') diff --git a/plugins/api.c b/plugins/api.c index 5adc4d2..fa1d9f2 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -331,3 +331,11 @@ int qemu_plugin_n_max_vcpus(void) return get_ms()->smp.max_cpus; #endif } + +/* + * Plugin output + */ +void qemu_plugin_outs(const char *string) +{ + qemu_log_mask(CPU_LOG_PLUGIN, "%s", string); +} -- cgit v1.1