Register our dev_t with make_dev

This commit is contained in:
Poul-Henning Kamp 1999-08-13 10:52:22 +00:00
parent 7dc5cd047f
commit 7248b5ce36

View File

@ -36,15 +36,10 @@
* SUCH DAMAGE.
*
* from: @(#)cons.c 7.2 (Berkeley) 5/9/91
* $Id: tty_cons.c,v 1.71 1999/08/09 10:34:58 phk Exp $
* $Id: tty_cons.c,v 1.72 1999/08/09 11:02:43 phk Exp $
*/
#include "opt_devfs.h"
#include <sys/param.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/kernel.h>
@ -106,9 +101,6 @@ static d_close_t *cn_phys_close; /* physical device close function */
static d_open_t *cn_phys_open; /* physical device open function */
struct consdev *cn_tab; /* physical console device info */
static struct tty *cn_tp; /* physical console tty struct */
#ifdef DEVFS
static void *cn_devfs_token; /* represents the devfs entry */
#endif /* DEVFS */
CONS_DRIVER(cons, NULL, NULL, NULL, NULL, NULL, NULL);
@ -440,10 +432,7 @@ cn_drvinit(void *unused)
{
cdevsw_add(&cn_cdevsw);
#ifdef DEVFS
cn_devfs_token = devfs_add_devswf(&cn_cdevsw, 0, DV_CHR,
UID_ROOT, GID_WHEEL, 0600, "console");
#endif
make_dev (&cn_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "console");
}
SYSINIT(cndev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,cn_drvinit,NULL)