diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2019-10-11 16:34:05 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2019-10-28 15:12:38 +0000 |
commit | ca76a66975f018c323cb609c0c55a4c8d4acde3b (patch) | |
tree | 924f16d7c93f6d4fe9fe1cba8f818bf1718540ed /include/qemu | |
parent | cbafa2362ab8d96af39d6b01a79ea4ed16d47dda (diff) | |
download | qemu-ca76a66975f018c323cb609c0c55a4c8d4acde3b.zip qemu-ca76a66975f018c323cb609c0c55a4c8d4acde3b.tar.gz qemu-ca76a66975f018c323cb609c0c55a4c8d4acde3b.tar.bz2 |
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>
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/log.h | 1 | ||||
-rw-r--r-- | include/qemu/qemu-plugin.h | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/qemu/log.h b/include/qemu/log.h index b097a6c..a91105b 100644 --- a/include/qemu/log.h +++ b/include/qemu/log.h @@ -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 diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index ddf267f..a00a7de 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -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 */ |