diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-12-13 12:46:00 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-12-13 23:37:32 +0100 |
commit | c2ea6c116dd27bd15dc1bd499dd8850c9daeef5a (patch) | |
tree | 476568a39adc0aa29d9458df425b8b2ad0c5c14b /drivers/serial | |
parent | f21bd0e51330af55b7a796d10c8087530c5cd85c (diff) | |
download | barebox-c2ea6c116dd27bd15dc1bd499dd8850c9daeef5a.tar.gz barebox-c2ea6c116dd27bd15dc1bd499dd8850c9daeef5a.tar.xz |
efi-stdio: Implement setting cursor visibility
The sequence "\b[?25h" makes the cursor visible and "\b[?25l" makes it
invisible. Implement support for this sequence.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/efi-stdio.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/serial/efi-stdio.c b/drivers/serial/efi-stdio.c index 15d4e2d6c6..3cc97ca0ca 100644 --- a/drivers/serial/efi-stdio.c +++ b/drivers/serial/efi-stdio.c @@ -169,7 +169,7 @@ static int efi_process_square_bracket(struct efi_console_priv *priv, const char int arg0 = -1, arg1 = -1, arg2 = -1; char *buf; - endp = strpbrk(inp, "ABCDEFGHJKmrn"); + endp = strpbrk(inp, "ABCDEFGHJKmrnhl"); if (!endp) return 0; @@ -185,6 +185,8 @@ static int efi_process_square_bracket(struct efi_console_priv *priv, const char if (*e == ';') arg2 = simple_strtoul(e + 1, &e, 10); } + } else if (*inp == '?') { + arg0 = simple_strtoul(inp + 1, NULL, 10); } switch (*endp) { @@ -242,6 +244,15 @@ static int efi_process_square_bracket(struct efi_console_priv *priv, const char free(buf); break; } + break; + case 'h': + if (*inp == '?' && arg0 == 25) + priv->out->enable_cursor(priv->out, true); + break; + case 'l': + if (*inp == '?' && arg0 == 25) + priv->out->enable_cursor(priv->out, false); + break; } return retlen; |