Module Name: src
Committed By: jmcneill
Date: Sun Aug 28 21:21:05 UTC 2011
Modified Files:
src/sys/arch/usermode/dev: ttycons.c
Log Message:
turn off input echo and buffering
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/usermode/dev/ttycons.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/usermode/dev/ttycons.c
diff -u src/sys/arch/usermode/dev/ttycons.c:1.4 src/sys/arch/usermode/dev/ttycons.c:1.5
--- src/sys/arch/usermode/dev/ttycons.c:1.4 Fri Aug 12 00:57:24 2011
+++ src/sys/arch/usermode/dev/ttycons.c Sun Aug 28 21:21:05 2011
@@ -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 <[email protected]>
@@ -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