summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-05-20 05:04:41 +0000
committerrwatson <rwatson@FreeBSD.org>2002-05-20 05:04:41 +0000
commita727c5433fc66e8780e10872c801f53472984e3c (patch)
tree8a0fb0a61ed53f8b5845d48cdeaa0f6cc4f293de
parent944c3986879f46b61bafdc5917577a7bf9b6a9da (diff)
downloadFreeBSD-src-a727c5433fc66e8780e10872c801f53472984e3c.zip
FreeBSD-src-a727c5433fc66e8780e10872c801f53472984e3c.tar.gz
Bump the rc driver a little bit closer to the 21st century: use
make_dev() to create device nodes for each of the serial port channels (ttym%d and cuam%d respectively, as borrowed from MAKEDEV). This allows the rc driver to work in 5.0. I've tested it with only one card, but will try sticking in a second card tomorrow and see what happens.
-rw-r--r--sys/dev/rc/rc.c6
-rw-r--r--sys/i386/isa/rc.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index 291c0e2..1e3f410 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -264,6 +264,12 @@ rcattach(dvp)
tp->t_lflag = tp->t_iflag = tp->t_oflag = 0;
tp->t_cflag = TTYDEF_CFLAG;
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
+ make_dev(&rc_cdevsw, chan + CD180_NCHAN * rcb->rcb_unit,
+ UID_ROOT, GID_WHEEL, 0600, "ttym%d", chan + CD180_NCHAN *
+ rcb->rcb_unit);
+ make_dev(&rc_cdevsw, chan + CD180_NCHAN * rcb->rcb_unit + 128,
+ UID_UUCP, GID_DIALER, 0660, "cuam%d", chan + CD180_NCHAN *
+ rcb->rcb_unit + 128);
}
rcb->rcb_probed = RC_ATTACHED;
if (!rc_started) {
diff --git a/sys/i386/isa/rc.c b/sys/i386/isa/rc.c
index 291c0e2..1e3f410 100644
--- a/sys/i386/isa/rc.c
+++ b/sys/i386/isa/rc.c
@@ -264,6 +264,12 @@ rcattach(dvp)
tp->t_lflag = tp->t_iflag = tp->t_oflag = 0;
tp->t_cflag = TTYDEF_CFLAG;
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
+ make_dev(&rc_cdevsw, chan + CD180_NCHAN * rcb->rcb_unit,
+ UID_ROOT, GID_WHEEL, 0600, "ttym%d", chan + CD180_NCHAN *
+ rcb->rcb_unit);
+ make_dev(&rc_cdevsw, chan + CD180_NCHAN * rcb->rcb_unit + 128,
+ UID_UUCP, GID_DIALER, 0660, "cuam%d", chan + CD180_NCHAN *
+ rcb->rcb_unit + 128);
}
rcb->rcb_probed = RC_ATTACHED;
if (!rc_started) {
OpenPOWER on IntegriCloud