aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph/ng_tty.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2004-06-26 08:44:04 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2004-06-26 08:44:04 +0000
commit4776c074260ab7883d22d32f70147c5304feba43 (patch)
tree04c3b44b676c0a500305ae7636bab0655dde9123 /sys/netgraph/ng_tty.c
parentb53dd31ab95f80c2beb5da7ddcca1e872f4838ce (diff)
Notes
Diffstat (limited to 'sys/netgraph/ng_tty.c')
-rw-r--r--sys/netgraph/ng_tty.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c
index 0ce67a58c3b2..9e4ecc31b40f 100644
--- a/sys/netgraph/ng_tty.c
+++ b/sys/netgraph/ng_tty.c
@@ -148,8 +148,7 @@ static struct linesw ngt_disc = {
ngt_tioctl,
ngt_input,
ngt_start,
- ttymodem,
- NG_TTY_DFL_HOTCHAR /* XXX can't change this in serial driver */
+ ttymodem
};
/* Netgraph node type descriptor */
@@ -193,12 +192,7 @@ ngt_open(struct cdev *dev, struct tty *tp)
s = splnet();
(void) spltty(); /* XXX is this necessary? */
- /* Already installed? */
- if (tp->t_line == NETGRAPHDISC) {
- sc = (sc_p) tp->t_sc;
- if (sc != NULL && sc->tp == tp)
- goto done;
- }
+ tp->t_hotchar = NG_TTY_DFL_HOTCHAR;
/* Initialize private struct */
MALLOC(sc, sc_p, sizeof(*sc), M_NETGRAPH, M_WAITOK | M_ZERO);
@@ -265,7 +259,6 @@ ngt_close(struct tty *tp, int flag)
s = spltty();
ttyflush(tp, FREAD | FWRITE);
clist_free_cblocks(&tp->t_outq);
- tp->t_line = 0;
if (sc != NULL) {
if (sc->flags & FLG_TIMEOUT) {
untimeout(ngt_timeout, sc, sc->chand);