Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/dev turn off input echo and buffering
details: https://anonhg.NetBSD.org/src/rev/521074cd7ca6
branches: trunk
changeset: 768907:521074cd7ca6
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Aug 28 21:21:05 2011 +0000
description:
turn off input echo and buffering
diffstat:
sys/arch/usermode/dev/ttycons.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (44 lines):
diff -r fad7e433e667 -r 521074cd7ca6 sys/arch/usermode/dev/ttycons.c
--- a/sys/arch/usermode/dev/ttycons.c Sun Aug 28 21:19:49 2011 +0000
+++ b/sys/arch/usermode/dev/ttycons.c Sun Aug 28 21:21:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ttycons.c,v 1.4 2011/08/12 00:57:24 jmcneill Exp $ */
+/* $NetBSD: ttycons.c,v 1.5 2011/08/28 21:21:05 jmcneill Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,12 +27,13 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttycons.c,v 1.4 2011/08/12 00:57:24 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttycons.c,v 1.5 2011/08/28 21:21:05 jmcneill Exp $");
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/systm.h>
#include <sys/device.h>
+#include <sys/termios.h>
#include <dev/cons.h>
@@ -87,9 +88,19 @@
void
ttycons_consinit(void)
{
+ struct thunk_termios t;
+
+ thunk_tcgetattr(0, &t);
+ t.c_lflag &= ~(ECHO|ICANON);
+ t.c_cc[VTIME] = 0;
+ t.c_cc[VMIN] = 1;
+ thunk_tcsetattr(0, TCSANOW, &t);
+
cn_tab = &ttycons_consdev;
cn_init_magic(&ttycons_cnm_state);
cn_set_magic("\047\001");
+
+
}
int
Home |
Main Index |
Thread Index |
Old Index