Browse Source

[syslog] Handle backspace characters

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 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
 	if ( character < 0 )
47
 	if ( character < 0 )
48
 		return 0;
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
 	/* Ignore carriage return */
57
 	/* Ignore carriage return */
51
 	if ( character == '\r' )
58
 	if ( character == '\r' )
52
 		return 0;
59
 		return 0;

Loading…
Cancel
Save