diff options
author | 2004-09-13 20:31:25 +0000 | |
---|---|---|
committer | 2004-09-13 20:31:25 +0000 | |
commit | 6bb09e947dc5e4e32a1bf05851ba35c20fb6b8ee (patch) | |
tree | 8245e8ade5e42319630e92476f728cbd8eeedb07 | |
parent | add br keymap; from miod (diff) | |
download | wireguard-openbsd-6bb09e947dc5e4e32a1bf05851ba35c20fb6b8ee.tar.xz wireguard-openbsd-6bb09e947dc5e4e32a1bf05851ba35c20fb6b8ee.zip |
for pcons tty and kernel console (ie. boot -a) input, replace prom ^H
with ^? as that is what we have standardized on for all delete keys.
this got missed, meaning boot -a and RAMDISK console tty were gross.
ok miod
-rw-r--r-- | sys/arch/sparc64/dev/consinit.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/pcons.c | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/sparc64/dev/consinit.c b/sys/arch/sparc64/dev/consinit.c index f088b6321eb..799c5974348 100644 --- a/sys/arch/sparc64/dev/consinit.c +++ b/sys/arch/sparc64/dev/consinit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: consinit.c,v 1.8 2003/06/16 20:46:10 miod Exp $ */ +/* $OpenBSD: consinit.c,v 1.9 2004/09/13 20:31:25 deraadt Exp $ */ /* $NetBSD: consinit.c,v 1.9 2000/10/20 05:32:35 mrg Exp $ */ /*- @@ -124,6 +124,8 @@ prom_cngetc(dev) #endif if (ch == '\r') ch = '\n'; + if (ch == '\b') + ch = '\177'; return ch; } diff --git a/sys/arch/sparc64/dev/pcons.c b/sys/arch/sparc64/dev/pcons.c index 147ff99cecb..b728e65d541 100644 --- a/sys/arch/sparc64/dev/pcons.c +++ b/sys/arch/sparc64/dev/pcons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcons.c,v 1.7 2003/10/03 16:44:50 miod Exp $ */ +/* $OpenBSD: pcons.c,v 1.8 2004/09/13 20:31:25 deraadt Exp $ */ /* $NetBSD: pcons.c,v 1.7 2001/05/02 10:32:20 scw Exp $ */ /*- @@ -333,8 +333,11 @@ pcons_poll(aux) while (OF_read(stdin, &ch, 1) > 0) { cn_check_magic(tp->t_dev, ch, pcons_cnm_state); - if (tp && (tp->t_state & TS_ISOPEN)) + if (tp && (tp->t_state & TS_ISOPEN)) { + if (ch == '\b') + ch = '\177'; (*linesw[tp->t_line].l_rint)(ch, tp); + } } timeout_add(&sc->sc_poll_to, 1); } |