diff options
author | phk <phk@FreeBSD.org> | 2004-10-18 21:51:27 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-10-18 21:51:27 +0000 |
commit | dafa1caf810829ca3d6fb150d0dae93477b45a80 (patch) | |
tree | 20f824d4840c6e3d41b20debf19f65f472d3916d /sys/alpha | |
parent | 6a50a160dbf47ef3773399dff0b9e84d05c0036b (diff) | |
download | FreeBSD-src-dafa1caf810829ca3d6fb150d0dae93477b45a80.zip FreeBSD-src-dafa1caf810829ca3d6fb150d0dae93477b45a80.tar.gz |
Add new function ttyinitmode() which sets our systemwide default
modes on a tty structure.
Both the ".init" and the current settings are initialized allowing
the function to be used both at attach and open time.
The function takes an argument to decide if echoing should be enabled.
Echoing should not be enabled for regular physical serial ports
unless they are consoles, in which case they should be configured
by ttyconsolemode() instead.
Use the new function throughout.
Diffstat (limited to 'sys/alpha')
-rw-r--r-- | sys/alpha/alpha/promcons.c | 7 | ||||
-rw-r--r-- | sys/alpha/tlsb/zs_tlsb.c | 7 |
2 files changed, 2 insertions, 12 deletions
diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c index 62ef0e8..5caca75 100644 --- a/sys/alpha/alpha/promcons.c +++ b/sys/alpha/alpha/promcons.c @@ -107,12 +107,7 @@ promopen(dev, flag, mode, td) tp->t_dev = dev; if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; - ttychars(tp); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_cflag = TTYDEF_CFLAG|CLOCAL; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyconsmode(tp, 0); ttsetwater(tp); setuptimeout = 1; diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 84f7e83..22093b2 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -283,12 +283,7 @@ zsopen(struct cdev *dev, int flag, int mode, struct thread *td) tp = dev->si_tty; if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; - ttychars(tp); - tp->t_iflag = TTYDEF_IFLAG; - tp->t_oflag = TTYDEF_OFLAG; - tp->t_cflag = TTYDEF_CFLAG|CLOCAL; - tp->t_lflag = TTYDEF_LFLAG; - tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; + ttyconsolemode(tp, 0); ttsetwater(tp); setuptimeout = 1; } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { |