summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_tty.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-10-23 04:28:11 +0000
committerjulian <julian@FreeBSD.org>1999-10-23 04:28:11 +0000
commitbd6712748945561c31293c9a9bbafee61470548b (patch)
treeda0a6d48db55b43982988a91a3e4b738558ea7c8 /sys/netgraph/ng_tty.c
parent309540210a9e865a6d20be7df5e9de244a48b047 (diff)
downloadFreeBSD-src-bd6712748945561c31293c9a9bbafee61470548b.zip
FreeBSD-src-bd6712748945561c31293c9a9bbafee61470548b.tar.gz
Now that Netgraph is in the system there are some cleanups we can do.
Also save a slightly closer to completion version of the PPPOE code. Submitted by: Archie Cobbs <archie@freebsd.org>
Diffstat (limited to 'sys/netgraph/ng_tty.c')
-rw-r--r--sys/netgraph/ng_tty.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c
index 4ec7bf9..568aae7 100644
--- a/sys/netgraph/ng_tty.c
+++ b/sys/netgraph/ng_tty.c
@@ -69,6 +69,7 @@
#include <sys/fcntl.h>
#include <sys/file.h>
#include <sys/tty.h>
+#include <sys/ttycom.h>
#include <sys/syslog.h>
#include <sys/errno.h>
#include <sys/ioccom.h>
@@ -158,7 +159,6 @@ static struct linesw ngt_disc = {
ttymodem,
NG_TTY_DFL_HOTCHAR /* XXX can't change this in serial driver */
};
-static int ngt_ldisc = -1;
/* Netgraph node type descriptor */
static struct ng_type typestruct = {
@@ -203,7 +203,7 @@ ngt_open(dev_t dev, struct tty *tp)
(void) spltty(); /* XXX is this necessary? */
/* Already installed? */
- if (tp->t_line == ngt_ldisc) {
+ if (tp->t_line == NETGRAPHDISC) {
sc = (sc_p) tp->t_sc;
if (sc != NULL && sc->tp == tp)
goto done;
@@ -676,17 +676,13 @@ ngt_mod_event(module_t mod, int event, void *data)
/* Register line discipline */
s = spltty();
- if ((ngt_ldisc = ldisc_register(LDISC_LOAD, &ngt_disc)) < 0) {
+ if ((ngt_ldisc = ldisc_register(NETGRAPHDISC, &ngt_disc)) < 0) {
splx(s);
log(LOG_ERR, "%s: can't register line discipline",
__FUNCTION__);
return (EIO);
}
splx(s);
-
- /* OK */
- log(LOG_INFO, "line discipline #%d registered to"
- " netgraph node type \"%s\"\n", ngt_ldisc, type->name);
break;
case MOD_UNLOAD:
OpenPOWER on IntegriCloud