[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 51/53] semihosting: Use console_out_gf for SYS_WRITE0
From: |
Richard Henderson |
Subject: |
[PATCH v4 51/53] semihosting: Use console_out_gf for SYS_WRITE0 |
Date: |
Tue, 7 Jun 2022 13:45:55 -0700 |
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
semihosting/arm-compat-semi.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c
index dea5b2de8d..21b6bc3a0f 100644
--- a/semihosting/arm-compat-semi.c
+++ b/semihosting/arm-compat-semi.c
@@ -436,8 +436,15 @@ void do_common_semihosting(CPUState *cs)
break;
case TARGET_SYS_WRITE0:
- ret = qemu_semihosting_console_outs(env, args);
- common_semi_set_ret(cs, ret);
+ {
+ ssize_t len = target_strlen(args);
+ if (len < 0) {
+ common_semi_dead_cb(cs, -1, EFAULT);
+ } else {
+ semihost_sys_write_gf(cs, common_semi_dead_cb,
+ &console_out_gf, args, len);
+ }
+ }
break;
case TARGET_SYS_WRITE:
--
2.34.1
- Re: [PATCH v4 47/53] semihosting: Create qemu_semihosting_guestfd_init, (continued)
- [PATCH v4 40/53] gdbstub: Adjust gdb_syscall_complete_cb declaration, Richard Henderson, 2022/06/07
- [PATCH v4 49/53] semihosting: Use console_out_gf for SYS_WRITEC, Richard Henderson, 2022/06/07
- [PATCH v4 46/53] semihosting: Add GuestFDConsole, Richard Henderson, 2022/06/07
- [PATCH v4 43/53] semihosting: Expand qemu_semihosting_console_inc to read, Richard Henderson, 2022/06/07
- [PATCH v4 51/53] semihosting: Use console_out_gf for SYS_WRITE0,
Richard Henderson <=
- [PATCH v4 50/53] semihosting: Remove qemu_semihosting_console_outc, Richard Henderson, 2022/06/07
- [PATCH v4 52/53] semihosting: Remove qemu_semihosting_console_outs, Richard Henderson, 2022/06/07
- [PATCH v4 53/53] semihosting: Create semihost_sys_poll_one, Richard Henderson, 2022/06/07
- [PATCH v4 44/53] semihosting: Cleanup chardev init, Richard Henderson, 2022/06/07