From 10f4dbda56eef05d130579ac3b175bce17cc99ea Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 16 Oct 2005 20:58:22 +0000 Subject: [PATCH] Make ttyconsolemode() call ttsetwater() so that drivers don't have to. --- sys/alpha/alpha/promcons.c | 1 - sys/alpha/tlsb/zs_tlsb.c | 1 - sys/dev/dcons/dcons_os.c | 1 - sys/dev/ofw/ofw_console.c | 1 - sys/dev/zs/zs.c | 1 - sys/ia64/ia64/ssc.c | 1 - sys/kern/tty.c | 1 + 7 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c index baf96c8c7795..609a9baac35a 100644 --- a/sys/alpha/alpha/promcons.c +++ b/sys/alpha/alpha/promcons.c @@ -108,7 +108,6 @@ promopen(dev, flag, mode, td) if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; ttyconsolemode(tp, 0); - ttsetwater(tp); setuptimeout = 1; } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 22093b27069d..a6034491d8cb 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -284,7 +284,6 @@ zsopen(struct cdev *dev, int flag, int mode, struct thread *td) if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; ttyconsolemode(tp, 0); - ttsetwater(tp); setuptimeout = 1; } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { splx(s); diff --git a/sys/dev/dcons/dcons_os.c b/sys/dev/dcons/dcons_os.c index 8ca20aa272f3..7a51e1cf38b3 100644 --- a/sys/dev/dcons/dcons_os.c +++ b/sys/dev/dcons/dcons_os.c @@ -295,7 +295,6 @@ dcons_open(DEV dev, int flag, int mode, THREAD *td) if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; ttyconsolemode(tp, 0); - ttsetwater(tp); } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { splx(s); return (EBUSY); diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index 08609944190e..b74832a3eb14 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -139,7 +139,6 @@ ofw_dev_open(struct cdev *dev, int flag, int mode, struct thread *td) if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; ttyconsolemode(tp, 0); - ttsetwater(tp); setuptimeout = 1; } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c index 41c6d8662957..d4562c78b488 100644 --- a/sys/dev/zs/zs.c +++ b/sys/dev/zs/zs.c @@ -473,7 +473,6 @@ zsttyopen(struct cdev *dev, int flags, int mode, struct thread *td) tp->t_ospeed = 0; (void)zstty_param(sc, tp, &t); ttychars(tp); - ttsetwater(tp); /* XXX turn on DTR */ diff --git a/sys/ia64/ia64/ssc.c b/sys/ia64/ia64/ssc.c index 6fc3a1b19057..f2da79295309 100644 --- a/sys/ia64/ia64/ssc.c +++ b/sys/ia64/ia64/ssc.c @@ -149,7 +149,6 @@ sscopen(struct cdev *dev, int flag, int mode, struct thread *td) if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_state |= TS_CARR_ON; ttyconsolemode(tp, 0); - ttsetwater(tp); setuptimeout = 1; } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 62e3028edf43..6e2b2de72682 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -3414,6 +3414,7 @@ ttyconsolemode(struct tty *tp, int speed) tp->t_lock_in.c_ispeed = tp->t_lock_in.c_ospeed = speed; tp->t_init_out = tp->t_init_in; tp->t_termios = tp->t_init_in; + ttsetwater(tp); } /*