[syslog] Handle backspace characters

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2017-06-13 11:54:41 +01:00
parent 356f6c1b64
commit 1fdf4dddbd

View File

@@ -47,6 +47,13 @@ size_t line_putchar ( struct line_console *line, int character ) {
if ( character < 0 )
return 0;
/* Handle backspace characters */
if ( character == '\b' ) {
if ( line->index )
line->index--;
return 0;
}
/* Ignore carriage return */
if ( character == '\r' )
return 0;