aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/zs
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/dev/zs
parent2b0448ba0c40d092a45e294f98d8256c6fdb33d7 (diff)
Notes
Diffstat (limited to 'sys/dev/zs')
-rw-r--r--sys/dev/zs/zs.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c
index b79060be2c95..eec675315568 100644
--- a/sys/dev/zs/zs.c
+++ b/sys/dev/zs/zs.c
@@ -276,12 +276,8 @@ zstty_attach(device_t dev)
tp->t_modem = zsttymodem;
tp->t_break = zsttybreak;
tp->t_stop = zsttystop;
- tp->t_iflag = TTYDEF_IFLAG;
- tp->t_oflag = TTYDEF_OFLAG;
- tp->t_lflag = TTYDEF_LFLAG;
+ ttyinitmode(tp, 0, 0);
tp->t_cflag = CREAD | CLOCAL | CS8;
- tp->t_ospeed = TTYDEF_SPEED;
- tp->t_ispeed = TTYDEF_SPEED;
if (zstty_console(dev, mode, sizeof(mode))) {
ttychars(tp);
@@ -472,19 +468,10 @@ zsttyopen(struct cdev *dev, int flags, int mode, struct thread *td)
sc->sc_preg[1] |= ZSWR1_RIE | ZSWR1_SIE;
sc->sc_iput = sc->sc_iget = sc->sc_ibuf;
- /*
- * Initialize the termios status to the defaults. Add in the
- * sticky bits from TIOCSFLAGS.
- */
- t.c_ispeed = 0;
- t.c_ospeed = tp->t_ospeed;
- t.c_cflag = TTYDEF_CFLAG;
+ ttyconsolemode(t, 0);
/* Make sure zstty_param() will do something. */
tp->t_ospeed = 0;
(void)zstty_param(sc, tp, &t);
- tp->t_iflag = TTYDEF_IFLAG;
- tp->t_oflag = TTYDEF_OFLAG;
- tp->t_lflag = TTYDEF_LFLAG;
ttychars(tp);
ttsetwater(tp);