diff options
author | phk <phk@FreeBSD.org> | 2004-09-17 22:26:27 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-09-17 22:26:27 +0000 |
commit | 2ca675d9a88fde7c309b7bdd38263acc90f3dade (patch) | |
tree | c9ba1d212146bfd7ea8c0c84066db28dc9e45b41 /sys/netgraph | |
parent | b3e38752b197d930007a2a1b66ec10a926cee8a9 (diff) | |
download | FreeBSD-src-2ca675d9a88fde7c309b7bdd38263acc90f3dade.zip FreeBSD-src-2ca675d9a88fde7c309b7bdd38263acc90f3dade.tar.gz |
Fix an issue with ng_tty which (ab)used the tty->t_sc field which is
reserved for the device drivers:
Add a t_lsc field for line discipline private use.
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/ng_tty.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c index 9ae20a0..f29b75f 100644 --- a/sys/netgraph/ng_tty.c +++ b/sys/netgraph/ng_tty.c @@ -239,7 +239,7 @@ ngt_open(struct cdev *dev, struct tty *tp) /* Set back pointers */ NG_NODE_SET_PRIVATE(sc->node, sc); - tp->t_sc = (caddr_t) sc; + tp->t_lsc = sc; /* * Pre-allocate cblocks to the an appropriate amount. @@ -265,7 +265,7 @@ done: static int ngt_close(struct tty *tp, int flag) { - const sc_p sc = (sc_p) tp->t_sc; + const sc_p sc = (sc_p) tp->t_lsc; int s; s = spltty(); @@ -279,7 +279,7 @@ ngt_close(struct tty *tp, int flag) ngt_nodeop_ok = 1; ng_rmnode_self(sc->node); ngt_nodeop_ok = 0; - tp->t_sc = NULL; + tp->t_lsc = NULL; } splx(s); return (0); @@ -309,7 +309,7 @@ ngt_write(struct tty *tp, struct uio *uio, int flag) static int ngt_tioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct thread *td) { - const sc_p sc = (sc_p) tp->t_sc; + const sc_p sc = (sc_p) tp->t_lsc; int s, error = 0; s = spltty(); @@ -343,7 +343,7 @@ done: static int ngt_input(int c, struct tty *tp) { - const sc_p sc = (sc_p) tp->t_sc; + const sc_p sc = (sc_p) tp->t_lsc; const node_p node = sc->node; struct mbuf *m; int s, error = 0; @@ -408,7 +408,7 @@ done: static int ngt_start(struct tty *tp) { - const sc_p sc = (sc_p) tp->t_sc; + const sc_p sc = (sc_p) tp->t_lsc; int s; s = spltty(); |