]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[syslog] Handle backspace characters
authorMichael Brown <mcb30@ipxe.org>
Tue, 13 Jun 2017 10:54:41 +0000 (11:54 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 13 Jun 2017 10:54:41 +0000 (11:54 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/lineconsole.c

index bb3bfafc9b01b83aa0c5be95b3b76903b14ef265..0a72d1434b327fd225605a884d921850a3b2eddc 100644 (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;