Browse Source

[syslog] Handle backspace characters

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 6 years ago
parent
commit
1fdf4dddbd
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      src/core/lineconsole.c

+ 7
- 0
src/core/lineconsole.c View File

@@ -47,6 +47,13 @@ size_t line_putchar ( struct line_console *line, int character ) {
47 47
 	if ( character < 0 )
48 48
 		return 0;
49 49
 
50
+	/* Handle backspace characters */
51
+	if ( character == '\b' ) {
52
+		if ( line->index )
53
+			line->index--;
54
+		return 0;
55
+	}
56
+
50 57
 	/* Ignore carriage return */
51 58
 	if ( character == '\r' )
52 59
 		return 0;

Loading…
Cancel
Save