From owner-svn-src-all@FreeBSD.ORG Tue Jan 4 10:59:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AFA11065672; Tue, 4 Jan 2011 10:59:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 794A88FC1C; Tue, 4 Jan 2011 10:59:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p04AxcfZ033833; Tue, 4 Jan 2011 10:59:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p04AxcpX033823; Tue, 4 Jan 2011 10:59:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201101041059.p04AxcpX033823@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 Jan 2011 10:59:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216952 - in head/sys: dev/pty dev/random geom kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2011 10:59:38 -0000 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: \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);