summaryrefslogtreecommitdiffstats
path: root/include/semihosting
diff options
context:
space:
mode:
authorRichard Henderson2022-05-01 21:42:37 +0200
committerRichard Henderson2022-06-28 01:05:52 +0200
commitcd66f20f614bb492e4e5be11e4b65d58b4a046ca (patch)
tree52b91ede9cb6138a2629ee1d826af4a8ac2b3814 /include/semihosting
parentsemihosting: Cleanup chardev init (diff)
downloadqemu-cd66f20f614bb492e4e5be11e4b65d58b4a046ca.tar.gz
qemu-cd66f20f614bb492e4e5be11e4b65d58b4a046ca.tar.xz
qemu-cd66f20f614bb492e4e5be11e4b65d58b4a046ca.zip
semihosting: Create qemu_semihosting_console_write
Will replace qemu_semihosting_console_{outs,outc}, but we need more plumbing first. Reviewed-by: Luc Michel <lmichel@kalray.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/semihosting')
-rw-r--r--include/semihosting/console.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/semihosting/console.h b/include/semihosting/console.h
index 39dbf1b062..6994f23c82 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