[PATCH 14/25] efi-stdio: Fix '\b' handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In vt100 a '\b' moves the cursor left, but without deleting the
character under the cursor. In UEFI the character under the cursor is
removed instead. Catch '\b' and manually move the cursor left without
deleting the character.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/serial/efi-stdio.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/serial/efi-stdio.c b/drivers/serial/efi-stdio.c
index d512cc3e01..beef911a16 100644
--- a/drivers/serial/efi-stdio.c
+++ b/drivers/serial/efi-stdio.c
@@ -329,6 +329,13 @@ static int efi_console_puts(struct console_device *cdev, const char *s,
 				efi_console_add_char(priv, ' ');
 			pos++;
 			break;
+		case '\b':
+			n = priv->out->mode->cursor_column;
+			if (n > 0)
+				priv->out->set_cursor_position(priv->out,
+					n - 1, priv->out->mode->cursor_row);
+			pos++;
+			break;
 		default:
 			efi_console_add_char(priv, s[pos]);
 			pos++;
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux