[syslog] Handle backspace characters
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
356f6c1b64
commit
1fdf4dddbd
|
@ -47,6 +47,13 @@ size_t line_putchar ( struct line_console *line, int character ) {
|
||||||
if ( character < 0 )
|
if ( character < 0 )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/* Handle backspace characters */
|
||||||
|
if ( character == '\b' ) {
|
||||||
|
if ( line->index )
|
||||||
|
line->index--;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Ignore carriage return */
|
/* Ignore carriage return */
|
||||||
if ( character == '\r' )
|
if ( character == '\r' )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Reference in New Issue