aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2017-06-13 11:54:41 +0100
committerMichael Brown <mcb30@ipxe.org>2017-06-13 11:54:41 +0100
commit1fdf4dddbd6fa2329138e4374c46bbca1ad264c6 (patch)
tree669595e61ac4b7dc97c53f70774b1281cef483d1 /src/core
parent356f6c1b64d7a97746d1816cef8ca22bdd8d0b5d (diff)
downloadipxe-1fdf4dddbd6fa2329138e4374c46bbca1ad264c6.zip
ipxe-1fdf4dddbd6fa2329138e4374c46bbca1ad264c6.tar.gz
ipxe-1fdf4dddbd6fa2329138e4374c46bbca1ad264c6.tar.bz2
[syslog] Handle backspace characters
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lineconsole.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/lineconsole.c b/src/core/lineconsole.c
index bb3bfaf..0a72d14 100644
--- a/src/core/lineconsole.c
+++ b/src/core/lineconsole.c
@@ -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;