[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 04/28] semihosting: enable chardev backed out
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH v2 04/28] semihosting: enable chardev backed output for console |
Date: |
Tue, 28 May 2019 10:36:44 +0100 |
User-agent: |
mu4e 1.3.2; emacs 26.1 |
Richard Henderson <address@hidden> writes:
> On 5/23/19 6:25 AM, Alex Bennée wrote:
>> int qemu_semihosting_log_out(const char *s, int len)
>> {
>> - return write(STDERR_FILENO, s, len);
>> + Chardev *chardev = semihosting_get_chardev();
>> + if (chardev) {
>> + return qemu_chr_write_all(chardev, (uint8_t *) s, len);
>> + } else {
>> + return write(STDERR_FILENO, s, len);
>> + }
>> }
>
> Can we not create a default chardev that outputs to stderr, so that the
> conditional is not required? Or does that somehow interfere with how this
> connects up for linux-user/?
The one linux-user case does it's own thing which uses the same API but
has a dumb implementation without a chardev. I'm unsure how you go about
creating a plain chardev backend programatically although I'll probably
want to do that for the plugins as well so I'll look into it.
I'll merge this as is for now though.
--
Alex Bennée
- Re: [Qemu-devel] [PATCH v2 17/28] tests/tcg/aarch64: add system boot.S, (continued)
[Qemu-devel] [PATCH v2 04/28] semihosting: enable chardev backed output for console, Alex Bennée, 2019/05/23
[Qemu-devel] [PATCH v2 15/28] tests/tcg/multiarch: add hello world system test, Alex Bennée, 2019/05/23
[Qemu-devel] [PATCH v2 05/28] target/arm: fixup some of the commentary for arm-semi, Alex Bennée, 2019/05/23
[Qemu-devel] [PATCH v2 07/28] target/arm: add LOG_UNIMP messages to arm-semi, Alex Bennée, 2019/05/23
[Qemu-devel] [PATCH v2 10/28] target/mips: convert UHI_plog to use common semihosting code, Alex Bennée, 2019/05/23
[Qemu-devel] [PATCH v2 13/28] tests/docker: Test more components on the Fedora default image, Alex Bennée, 2019/05/23
[Qemu-devel] [PATCH v2 14/28] tests/tcg/multiarch: add support for multiarch system tests, Alex Bennée, 2019/05/23
[Qemu-devel] [PATCH v2 16/28] editorconfig: add settings for .s/.S files, Alex Bennée, 2019/05/23
[Qemu-devel] [PATCH v2 20/28] tests/tcg/multiarch: expand system memory test to cover more, Alex Bennée, 2019/05/23
[Qemu-devel] [PATCH v2 27/28] tests/qemu-iotests: re-format output to for make check-block, Alex Bennée, 2019/05/23