diff options
author | phk <phk@FreeBSD.org> | 2004-02-13 12:04:15 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-02-13 12:04:15 +0000 |
commit | 693de46c56790d283619ed469a59efd2e282b2d0 (patch) | |
tree | 809d1562e6901413587fc06512d7b2b76a15b0bc /sys/dev | |
parent | af8088c9ba27292603409aa376603147869c8904 (diff) | |
download | FreeBSD-src-693de46c56790d283619ed469a59efd2e282b2d0.zip FreeBSD-src-693de46c56790d283619ed469a59efd2e282b2d0.tar.gz |
Back out my last commit to syscons, things seem to be far more evil
than suspected.
and obviously nobody runs the patches I post to -current :-(
Poul-Henning
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/syscons/syscons.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 88c6ade..0115954 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -389,11 +389,9 @@ sc_attach_unit(int unit, int flags) (void *)(uintptr_t)unit, SHUTDOWN_PRI_DEFAULT); for (vc = 0; vc < sc->vtys; vc++) { - if (sc->dev[vc] == NULL) { - dev = make_dev(&sc_cdevsw, vc + unit * MAXCONS, - UID_ROOT, GID_WHEEL, 0600, "ttyv%r", vc + unit * MAXCONS); - sc->dev[vc] = dev; - } + dev = make_dev(&sc_cdevsw, vc + unit * MAXCONS, + UID_ROOT, GID_WHEEL, 0600, "ttyv%r", vc + unit * MAXCONS); + sc->dev[vc] = dev; /* * The first vty already has struct tty and scr_stat initialized * in scinit(). The other vtys will have these structs when @@ -2732,8 +2730,7 @@ scinit(int unit, int flags) sc->vtys = MAXCONS; /* XXX: should be configurable */ if (flags & SC_KERNEL_CONSOLE) { sc->dev = main_devs; - sc->dev[0] = make_dev(&sc_cdevsw, unit * MAXCONS, - UID_ROOT, GID_WHEEL, 0600, "ttyv%r", unit * MAXCONS); + sc->dev[0] = makedev(CDEV_MAJOR, unit*MAXCONS); sc->dev[0]->si_tty = &main_tty; ttyregister(&main_tty); scp = &main_console; @@ -2748,8 +2745,7 @@ scinit(int unit, int flags) } else { /* assert(sc_malloc) */ sc->dev = malloc(sizeof(dev_t)*sc->vtys, M_DEVBUF, M_WAITOK|M_ZERO); - sc->dev[0] = make_dev(&sc_cdevsw, unit * MAXCONS, - UID_ROOT, GID_WHEEL, 0600, "ttyv%r", unit * MAXCONS); + sc->dev[0] = makedev(CDEV_MAJOR, unit*MAXCONS); sc->dev[0]->si_tty = ttymalloc(sc->dev[0]->si_tty); scp = alloc_scp(sc, sc->first_vty); } |