Date: Tue, 4 Jan 2011 10:59:38 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r216952 - in head/sys: dev/pty dev/random geom kern Message-ID: <201101041059.p04AxcpX033823@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue Jan 4 10:59:38 2011 New Revision: 216952 URL: http://svn.freebsd.org/changeset/base/216952 Log: Finish r210923, 210926. Mark some devices as eternal. MFC after: 2 weeks Modified: head/sys/dev/pty/pty.c head/sys/dev/random/randomdev.c head/sys/geom/geom_ctl.c head/sys/kern/kern_descrip.c head/sys/kern/subr_bus.c head/sys/kern/subr_devstat.c head/sys/kern/subr_log.c head/sys/kern/tty.c head/sys/kern/tty_tty.c Modified: head/sys/dev/pty/pty.c ============================================================================== --- head/sys/dev/pty/pty.c Tue Jan 4 10:25:55 2011 (r216951) +++ head/sys/dev/pty/pty.c Tue Jan 4 10:59:38 2011 (r216952) @@ -142,7 +142,8 @@ pty_modevent(module_t mod, int type, voi 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; Modified: head/sys/dev/random/randomdev.c ============================================================================== --- head/sys/dev/random/randomdev.c Tue Jan 4 10:25:55 2011 (r216951) +++ head/sys/dev/random/randomdev.c Tue Jan 4 10:59:38 2011 (r216952) @@ -195,8 +195,8 @@ random_modevent(module_t mod __unused, i 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; Modified: head/sys/geom/geom_ctl.c ============================================================================== --- head/sys/geom/geom_ctl.c Tue Jan 4 10:25:55 2011 (r216951) +++ head/sys/geom/geom_ctl.c Tue Jan 4 10:59:38 2011 (r216952) @@ -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")); Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Tue Jan 4 10:25:55 2011 (r216951) +++ head/sys/kern/kern_descrip.c Tue Jan 4 10:59:38 2011 (r216952) @@ -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"); } Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Tue Jan 4 10:25:55 2011 (r216951) +++ head/sys/kern/subr_bus.c Tue Jan 4 10:59:38 2011 (r216952) @@ -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); Modified: head/sys/kern/subr_devstat.c ============================================================================== --- head/sys/kern/subr_devstat.c Tue Jan 4 10:25:55 2011 (r216951) +++ head/sys/kern/subr_devstat.c Tue Jan 4 10:59:38 2011 (r216952) @@ -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; } Modified: head/sys/kern/subr_log.c ============================================================================== --- head/sys/kern/subr_log.c Tue Jan 4 10:25:55 2011 (r216951) +++ head/sys/kern/subr_log.c Tue Jan 4 10:59:38 2011 (r216952) @@ -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); Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Tue Jan 4 10:25:55 2011 (r216951) +++ head/sys/kern/tty.c Tue Jan 4 10:59:38 2011 (r216952) @@ -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); Modified: head/sys/kern/tty_tty.c ============================================================================== --- head/sys/kern/tty_tty.c Tue Jan 4 10:25:55 2011 (r216951) +++ head/sys/kern/tty_tty.c Tue Jan 4 10:59:38 2011 (r216952) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101041059.p04AxcpX033823>