summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/stand
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2015-10-28 13:33:43 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2015-10-28 13:33:43 +0000
commitcc66d56b77ba9b8012435fede8ef8b6286393ded (patch)
tree3beb89a3f9a43772342d420e18893b8ad7ce624c /sys/arch/amd64/stand
parent158253f776e6a96aae78798b3ef27bba424bd992 (diff)
Support backspace in softraid boot passphrase prompt.
From uwe@
Diffstat (limited to 'sys/arch/amd64/stand')
-rw-r--r--sys/arch/amd64/stand/libsa/softraid.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/amd64/stand/libsa/softraid.c b/sys/arch/amd64/stand/libsa/softraid.c
index 336865ae885..79fe62d143d 100644
--- a/sys/arch/amd64/stand/libsa/softraid.c
+++ b/sys/arch/amd64/stand/libsa/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.14 2015/10/08 12:54:30 krw Exp $ */
+/* $OpenBSD: softraid.c,v 1.15 2015/10/28 13:33:42 jsing Exp $ */
/*
* Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
@@ -557,6 +557,10 @@ sr_crypto_decrypt_keys(struct sr_boot_volume *bv)
c = cngetc();
if (c == '\r' || c == '\n')
break;
+ else if (c == '\b') {
+ i = i > 0 ? i - 2 : -1;
+ continue;
+ }
passphrase[i] = (c & 0xff);
}
passphrase[i] = 0;