diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2002-08-12 00:41:12 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2002-08-12 00:41:12 +0000 |
commit | 941ec3d1051d178a11f6baa72a3d520413033f2e (patch) | |
tree | 5396099a5fab4d585f46eea33ffd6c959f438465 /sys/arch/sparc/stand/common/promdev.c | |
parent | 1758d6c41e698753b6e81f0e7a68d88e777b8c19 (diff) |
During prompts on sun4 class machines, disable local echo to prevent
ddoouubbllyy written characters.
Modeled from the kernel's prom console routines.
Diffstat (limited to 'sys/arch/sparc/stand/common/promdev.c')
-rw-r--r-- | sys/arch/sparc/stand/common/promdev.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/arch/sparc/stand/common/promdev.c b/sys/arch/sparc/stand/common/promdev.c index 641bfb15d3a..794b69185d5 100644 --- a/sys/arch/sparc/stand/common/promdev.c +++ b/sys/arch/sparc/stand/common/promdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: promdev.c,v 1.5 2002/03/14 03:16:00 millert Exp $ */ +/* $OpenBSD: promdev.c,v 1.6 2002/08/12 00:41:11 miod Exp $ */ /* $NetBSD: promdev.c,v 1.16 1995/11/14 15:04:01 pk Exp $ */ /* @@ -414,8 +414,19 @@ getchar() if (promvec->pv_romvec_vers > 2) while ((n = (*promvec->pv_v2devops.v2_read) (*promvec->pv_v2bootargs.v2_fd0, (caddr_t)&c, 1)) != 1); - else - c = (*promvec->pv_getchar)(); + else { + /* SUN4 PROM: must turn off local echo */ + extern struct om_vector *oldpvec; + int saveecho = 0; + + if (CPU_ISSUN4) { + saveecho = *(oldpvec->echo); + *(oldpvec->echo) = 0; + } + c = (*promvec->pv_getchar)(); + if (CPU_ISSUN4) + *(oldpvec->echo) = saveecho; + } if (c == '\r') c = '\n'; |