From cd66f20f614bb492e4e5be11e4b65d58b4a046ca Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 1 May 2022 12:42:37 -0700 Subject: semihosting: Create qemu_semihosting_console_write Will replace qemu_semihosting_console_{outs,outc}, but we need more plumbing first. Reviewed-by: Luc Michel Signed-off-by: Richard Henderson --- include/semihosting/console.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/semihosting') diff --git a/include/semihosting/console.h b/include/semihosting/console.h index 39dbf1b..6994f23 100644 --- a/include/semihosting/console.h +++ b/include/semihosting/console.h @@ -55,6 +55,18 @@ void qemu_semihosting_console_outc(CPUArchState *env, target_ulong c); int qemu_semihosting_console_read(CPUState *cs, void *buf, int len); /** + * qemu_semihosting_console_write: + * @buf: host buffer + * @len: buffer size + * + * Write len bytes from buf to the debug console. + * + * Returns: number of bytes written -- this should only ever be short + * on some sort of i/o error. + */ +int qemu_semihosting_console_write(void *buf, int len); + +/** * qemu_semihosting_log_out: * @s: pointer to string * @len: length of string -- cgit v1.1