summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-05-14 17:43:49 +0000
committerian <ian@FreeBSD.org>2014-05-14 17:43:49 +0000
commit835175f3b80497bad3d7472e919302dbaf94c287 (patch)
tree9321c438fa0d07d9fe2b9d9912353994a1b93488
parent3c9602820517b21689d8a6153fd6f7ea38c7a749 (diff)
downloadFreeBSD-src-835175f3b80497bad3d7472e919302dbaf94c287.zip
FreeBSD-src-835175f3b80497bad3d7472e919302dbaf94c287.tar.gz
MFC r260118
Delete echoed doesn't rub out the previous character, so always use <backspace> <space> <backspace> instead. This fixes hitting DELETE instead of BACKSPACE at mountroot> prompt.
-rw-r--r--sys/kern/kern_cons.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c
index d17846a..72b384f 100644
--- a/sys/kern/kern_cons.c
+++ b/sys/kern/kern_cons.c
@@ -432,10 +432,8 @@ cngets(char *cp, size_t size, int visible)
case '\b':
case '\177':
if (lp > cp) {
- if (visible) {
- cnputc(c);
- cnputs(" \b");
- }
+ if (visible)
+ cnputs("\b \b");
lp--;
}
continue;
OpenPOWER on IntegriCloud