Finish r210923, 210926. Mark some devices as eternal.
MFC after: 2 weeks
This commit is contained in:
parent
86eafd5cfb
commit
a6922e1e8c
@ -142,7 +142,8 @@ pty_modevent(module_t mod, int type, void *data)
|
||||
switch(type) {
|
||||
case MOD_LOAD:
|
||||
EVENTHANDLER_REGISTER(dev_clone, pty_clone, 0, 1000);
|
||||
make_dev(&ptmx_cdevsw, 0, UID_ROOT, GID_WHEEL, 0666, "ptmx");
|
||||
make_dev_credf(MAKEDEV_ETERNAL_KLD, &ptmx_cdevsw, 0, NULL,
|
||||
UID_ROOT, GID_WHEEL, 0666, "ptmx");
|
||||
break;
|
||||
case MOD_SHUTDOWN:
|
||||
break;
|
||||
|
@ -195,8 +195,8 @@ random_modevent(module_t mod __unused, int type, void *data __unused)
|
||||
printf("random: <entropy source, %s>\n",
|
||||
random_systat.ident);
|
||||
|
||||
random_dev = make_dev(&random_cdevsw, RANDOM_MINOR,
|
||||
UID_ROOT, GID_WHEEL, 0666, "random");
|
||||
random_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &random_cdevsw,
|
||||
RANDOM_MINOR, NULL, UID_ROOT, GID_WHEEL, 0666, "random");
|
||||
make_dev_alias(random_dev, "urandom"); /* XXX Deprecated */
|
||||
|
||||
break;
|
||||
|
@ -75,7 +75,7 @@ void
|
||||
g_ctl_init(void)
|
||||
{
|
||||
|
||||
make_dev(&g_ctl_cdevsw, 0,
|
||||
make_dev_credf(MAKEDEV_ETERNAL, &g_ctl_cdevsw, 0, NULL,
|
||||
UID_ROOT, GID_OPERATOR, 0640, PATH_GEOM_CTL);
|
||||
KASSERT(GCTL_PARAM_RD == VM_PROT_READ,
|
||||
("GCTL_PARAM_RD != VM_PROT_READ"));
|
||||
|
@ -3430,11 +3430,14 @@ fildesc_drvinit(void *unused)
|
||||
{
|
||||
struct cdev *dev;
|
||||
|
||||
dev = make_dev(&fildesc_cdevsw, 0, UID_ROOT, GID_WHEEL, 0666, "fd/0");
|
||||
dev = make_dev_credf(MAKEDEV_ETERNAL, &fildesc_cdevsw, 0, NULL,
|
||||
UID_ROOT, GID_WHEEL, 0666, "fd/0");
|
||||
make_dev_alias(dev, "stdin");
|
||||
dev = make_dev(&fildesc_cdevsw, 1, UID_ROOT, GID_WHEEL, 0666, "fd/1");
|
||||
dev = make_dev_credf(MAKEDEV_ETERNAL, &fildesc_cdevsw, 1, NULL,
|
||||
UID_ROOT, GID_WHEEL, 0666, "fd/1");
|
||||
make_dev_alias(dev, "stdout");
|
||||
dev = make_dev(&fildesc_cdevsw, 2, UID_ROOT, GID_WHEEL, 0666, "fd/2");
|
||||
dev = make_dev_credf(MAKEDEV_ETERNAL, &fildesc_cdevsw, 2, NULL,
|
||||
UID_ROOT, GID_WHEEL, 0666, "fd/2");
|
||||
make_dev_alias(dev, "stderr");
|
||||
}
|
||||
|
||||
|
@ -405,8 +405,8 @@ static struct cdev *devctl_dev;
|
||||
static void
|
||||
devinit(void)
|
||||
{
|
||||
devctl_dev = make_dev(&dev_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600,
|
||||
"devctl");
|
||||
devctl_dev = make_dev_credf(MAKEDEV_ETERNAL, &dev_cdevsw, 0, NULL,
|
||||
UID_ROOT, GID_WHEEL, 0600, "devctl");
|
||||
mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF);
|
||||
cv_init(&devsoftc.cv, "dev cv");
|
||||
TAILQ_INIT(&devsoftc.devq);
|
||||
|
@ -476,7 +476,7 @@ devstat_alloc(void)
|
||||
|
||||
mtx_assert(&devstat_mutex, MA_NOTOWNED);
|
||||
if (!once) {
|
||||
make_dev(&devstat_cdevsw, 0,
|
||||
make_dev_credf(MAKEDEV_ETERNAL, &devstat_cdevsw, 0, NULL,
|
||||
UID_ROOT, GID_WHEEL, 0400, DEVSTAT_DEVICE_NAME);
|
||||
once = 1;
|
||||
}
|
||||
|
@ -256,7 +256,8 @@ log_drvinit(void *unused)
|
||||
|
||||
cv_init(&log_wakeup, "klog");
|
||||
callout_init_mtx(&logsoftc.sc_callout, &msgbuf_lock, 0);
|
||||
make_dev(&log_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "klog");
|
||||
make_dev_credf(MAKEDEV_ETERNAL, &log_cdevsw, 0, NULL, UID_ROOT,
|
||||
GID_WHEEL, 0600, "klog");
|
||||
}
|
||||
|
||||
SYSINIT(logdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE,log_drvinit,NULL);
|
||||
|
@ -1946,8 +1946,8 @@ static void
|
||||
ttyconsdev_init(void *unused)
|
||||
{
|
||||
|
||||
dev_console = make_dev(&ttyconsdev_cdevsw, 0, UID_ROOT, GID_WHEEL,
|
||||
0600, "console");
|
||||
dev_console = make_dev_credf(MAKEDEV_ETERNAL, &ttyconsdev_cdevsw, 0,
|
||||
NULL, UID_ROOT, GID_WHEEL, 0600, "console");
|
||||
}
|
||||
|
||||
SYSINIT(tty, SI_SUB_DRIVERS, SI_ORDER_FIRST, ttyconsdev_init, NULL);
|
||||
|
@ -87,7 +87,8 @@ ctty_drvinit(void *unused)
|
||||
{
|
||||
|
||||
EVENTHANDLER_REGISTER(dev_clone, ctty_clone, 0, 1000);
|
||||
ctty = make_dev(&ctty_cdevsw, 0, 0, 0, 0666, "ctty");
|
||||
ctty = make_dev_credf(MAKEDEV_ETERNAL, &ctty_cdevsw, 0, NULL, UID_ROOT,
|
||||
GID_WHEEL, 0666, "ctty");
|
||||
}
|
||||
|
||||
SYSINIT(cttydev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE,ctty_drvinit,NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user