From b5d3c6567285b6c860734382c6383a5011983a33 Mon Sep 17 00:00:00 2001 From: Yao Wei Date: Wed, 24 Sep 2014 15:40:21 +0800 Subject: [PATCH] Add 0x7f as backspace key in shell --- sys/shell/shell.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/shell/shell.c b/sys/shell/shell.c index 6cc07e9630..528a4275ed 100644 --- a/sys/shell/shell.c +++ b/sys/shell/shell.c @@ -236,7 +236,8 @@ static int readline(shell_t *shell, char *buf, size_t size) shell->put_char('\n'); return 0; } - else if (c == '\b') { + /* QEMU uses 0x7f (DEL) as backspace, while 0x08 (BS) is for most terminals */ + else if (c == 0x08 || c == 0x7f) { if (line_buf_ptr == buf) { /* The line is empty. */ continue;