[U-Boot,1/1] serial: sandbox: support Unicode
diff mbox series

Message ID 20191109095902.14425-1-xypron.glpk@gmx.de
State New
Delegated to: Simon Glass
Headers show
Series
  • [U-Boot,1/1] serial: sandbox: support Unicode
Related show

Commit Message

Heinrich Schuchardt Nov. 9, 2019, 9:59 a.m. UTC
Due to a conversion error the sandbox does not accept byte values 0x80-0xff
from the keyboard. The UEFI extended text input unit test requires Unicode
support.

Use unsigned char for the serial buffer.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/serial/sandbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.24.0

Comments

Andy Shevchenko Nov. 9, 2019, 10:35 a.m. UTC | #1
On Sat, Nov 9, 2019 at 11:59 AM Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> Due to a conversion error the sandbox does not accept byte values 0x80-0xff
> from the keyboard. The UEFI extended text input unit test requires Unicode
> support.
>
> Use unsigned char for the serial buffer.
>

FWIW,
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  drivers/serial/sandbox.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
> index 2f7bc24887..1af5cc12f3 100644
> --- a/drivers/serial/sandbox.c
> +++ b/drivers/serial/sandbox.c
> @@ -33,7 +33,7 @@ DECLARE_GLOBAL_DATA_PTR;
>   *   serial_buf_write           == serial_buf_read -> empty buffer
>   *   (serial_buf_write + 1) % 16 == serial_buf_read -> full buffer
>   */
> -static char serial_buf[16];
> +static unsigned char serial_buf[16];
>  static unsigned int serial_buf_write;
>  static unsigned int serial_buf_read;
>
> --
> 2.24.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot

Patch
diff mbox series

diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index 2f7bc24887..1af5cc12f3 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -33,7 +33,7 @@  DECLARE_GLOBAL_DATA_PTR;
  *   serial_buf_write		 == serial_buf_read -> empty buffer
  *   (serial_buf_write + 1) % 16 == serial_buf_read -> full buffer
  */
-static char serial_buf[16];
+static unsigned char serial_buf[16];
 static unsigned int serial_buf_write;
 static unsigned int serial_buf_read;