[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed out
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output |
Date: |
Thu, 9 May 2019 15:48:04 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 5/9/19 9:58 AM, Alex Bennée wrote:
> @@ -51,12 +51,18 @@ static inline const char *semihosting_get_cmdline(void)
> {
> return NULL;
> }
> +
> +static inline Chardev *semihosting_get_chardev(void)
> +{
> + return NULL;
> +}
Isn't the point of this function to avoid...
> - return write(STDERR_FILENO, &c, 1);
> +#ifdef CONFIG_SOFTMMU
> + Chardev *chardev = semihosting_get_chardev();
> + if (chardev) {
> + return qemu_chr_write_all(chardev, (uint8_t *) &c, 1);
> + } else
> +#endif
> + {
> + return write(STDERR_FILENO, &c, 1);
> + }
... this ifdef?
Better to change
- char c;
+ uint8_t c;
above to avoid the cast in the call to qemu_chr_write_all?
Or perhaps we should adjust qemu_chr_write_all to take void*?
r~
- [Qemu-devel] [PATCH v1 01/23] tests/docker: add ubuntu 18.04, (continued)
- [Qemu-devel] [PATCH v1 01/23] tests/docker: add ubuntu 18.04, Alex Bennée, 2019/05/09
- [Qemu-devel] [PATCH v1 02/23] tests/docker: Test more components on the Fedora default image, Alex Bennée, 2019/05/09
- [Qemu-devel] [PATCH v1 04/23] tests/tcg/multiarch: add hello world system test, Alex Bennée, 2019/05/09
- [Qemu-devel] [PATCH v1 03/23] tests/tcg/multiarch: add support for multiarch system tests, Alex Bennée, 2019/05/09
- [Qemu-devel] [PATCH v1 06/23] editorconfig: add settings for .s/.S files, Alex Bennée, 2019/05/09
- [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output, Alex Bennée, 2019/05/09
- Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output,
Richard Henderson <=
Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output, Peter Maydell, 2019/05/10
[Qemu-devel] [PATCH v1 08/23] tests/tcg/multiarch: move the system memory test, Alex Bennée, 2019/05/09
[Qemu-devel] [PATCH v1 10/23] tests/tcg/multiarch: expand system memory test to cover more, Alex Bennée, 2019/05/09