Skip to content

Commit

Permalink
[syslog] Handle backspace characters
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Jun 13, 2017
1 parent 356f6c1 commit 1fdf4dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/lineconsole.c
Expand Up @@ -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;
Expand Down

0 comments on commit 1fdf4dd

Please sign in to comment.