plugin: add qemu_plugin_outs helper
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 <alex.bennee@linaro.org> Reviewed-by: Aaron Lindsay <aaron@os.amperecomputing.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -36,4 +36,5 @@
|
||||
qemu_plugin_vcpu_for_each;
|
||||
qemu_plugin_n_vcpus;
|
||||
qemu_plugin_n_max_vcpus;
|
||||
qemu_plugin_outs;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user