[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH v2 04/28] semihosting: enable chardev
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH v2 04/28] semihosting: enable chardev backed output for console |
Date: |
Thu, 23 May 2019 11:16:28 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
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/?
r~
- [Qemu-arm] [PATCH v2 16/28] editorconfig: add settings for .s/.S files, (continued)
- [Qemu-arm] [PATCH v2 16/28] editorconfig: add settings for .s/.S files, Alex Bennée, 2019/05/23
- [Qemu-arm] [PATCH v2 05/28] target/arm: fixup some of the commentary for arm-semi, Alex Bennée, 2019/05/23
- [Qemu-arm] [PATCH v2 10/28] target/mips: convert UHI_plog to use common semihosting code, Alex Bennée, 2019/05/23
- [Qemu-arm] [PATCH v2 08/28] target/arm: correct return values for WRITE/READ in arm-semi, Alex Bennée, 2019/05/23
- [Qemu-arm] [PATCH v2 11/28] MAINTAINERS: update for semihostings new home, Alex Bennée, 2019/05/23
- [Qemu-arm] [PATCH v2 06/28] target/arm: use the common interface for WRITE0/WRITEC in arm-semi, Alex Bennée, 2019/05/23
- [Qemu-arm] [PATCH v2 14/28] tests/tcg/multiarch: add support for multiarch system tests, Alex Bennée, 2019/05/23
- [Qemu-arm] [PATCH v2 04/28] semihosting: enable chardev backed output for console, Alex Bennée, 2019/05/23
- Re: [Qemu-arm] [Qemu-devel] [PATCH v2 04/28] semihosting: enable chardev backed output for console,
Richard Henderson <=
- [Qemu-arm] [PATCH v2 03/28] semihosting: implement a semihosting console, Alex Bennée, 2019/05/23
[Qemu-arm] [PATCH v2 15/28] tests/tcg/multiarch: add hello world system test, Alex Bennée, 2019/05/23
[Qemu-arm] [PATCH v2 17/28] tests/tcg/aarch64: add system boot.S, Alex Bennée, 2019/05/23
[Qemu-arm] [PATCH v2 18/28] tests/tcg/multiarch: move the system memory test, Alex Bennée, 2019/05/23