From 878807041a757ba673419a4105d549634aac49b4 Mon Sep 17 00:00:00 2001 From: jmcneill Date: Sun, 28 Aug 2011 21:21:05 +0000 Subject: [PATCH] turn off input echo and buffering --- sys/arch/usermode/dev/ttycons.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/arch/usermode/dev/ttycons.c b/sys/arch/usermode/dev/ttycons.c index 03568dcdde07..919eea3190da 100644 --- a/sys/arch/usermode/dev/ttycons.c +++ b/sys/arch/usermode/dev/ttycons.c @@ -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 @@ -27,12 +27,13 @@ */ #include -__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 #include #include #include +#include #include @@ -87,9 +88,19 @@ ttycons_attach(device_t parent, device_t self, void *opaque) 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