aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/isa
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2004-10-18 21:51:27 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2004-10-18 21:51:27 +0000
commit95bc56897714a12b8e95c92dd8e1a70f1154162d (patch)
tree20f824d4840c6e3d41b20debf19f65f472d3916d /sys/i386/isa
parent2b0448ba0c40d092a45e294f98d8256c6fdb33d7 (diff)
downloadsrc-95bc56897714a12b8e95c92dd8e1a70f1154162d.tar.gz
src-95bc56897714a12b8e95c92dd8e1a70f1154162d.zip
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.
Notes
Notes: svn path=/head/; revision=136680
Diffstat (limited to 'sys/i386/isa')
-rw-r--r--sys/i386/isa/pcvt/pcvt_drv.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c
index 16aa04ccf92c..6eb1ac1b905d 100644
--- a/sys/i386/isa/pcvt/pcvt_drv.c
+++ b/sys/i386/isa/pcvt/pcvt_drv.c
@@ -297,12 +297,7 @@ pcvt_open(struct cdev *dev, int flag, int mode, struct thread *td)
if ((tp->t_state & TS_ISOPEN) == 0)
{
- ttychars(tp);
- tp->t_iflag = TTYDEF_IFLAG;
- tp->t_oflag = TTYDEF_OFLAG;
- tp->t_cflag = TTYDEF_CFLAG;
- tp->t_lflag = TTYDEF_LFLAG;
- tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
+ ttyinitmode(tp, 1, 0);
pcvt_param(tp, &tp->t_termios);
ttyld_modem(tp, 1); /* fake connection */
winsz = 1; /* set winsize later */