mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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:
parent
cbafa2362a
commit
ca76a66975
5 changed files with 19 additions and 0 deletions
|
@ -45,6 +45,7 @@ static inline bool qemu_log_separate(void)
|
|||
/* LOG_TRACE (1 << 15) is defined in log-for-trace.h */
|
||||
#define CPU_LOG_TB_OP_IND (1 << 16)
|
||||
#define CPU_LOG_TB_FPU (1 << 17)
|
||||
#define CPU_LOG_PLUGIN (1 << 18)
|
||||
|
||||
/* Lock output for a series of related logs. Since this is not needed
|
||||
* for a single qemu_log / qemu_log_mask / qemu_log_mask_and_addr, we
|
||||
|
|
|
@ -384,4 +384,10 @@ int qemu_plugin_n_vcpus(void);
|
|||
/* returns -1 in user-mode */
|
||||
int qemu_plugin_n_max_vcpus(void);
|
||||
|
||||
/**
|
||||
* qemu_plugin_outs() - output string via QEMU's logging system
|
||||
* @string: a string
|
||||
*/
|
||||
void qemu_plugin_outs(const char *string);
|
||||
|
||||
#endif /* QEMU_PLUGIN_API_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue