Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jan 2011 10:42:13 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r217532 - in stable/8/sys: dev/random geom kern
Message-ID:  <201101181042.p0IAgDsL034185@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Jan 18 10:42:13 2011
New Revision: 217532
URL: http://svn.freebsd.org/changeset/base/217532

Log:
  MFC r216952:
  Mark some devices as eternal.

Modified:
  stable/8/sys/dev/random/randomdev.c
  stable/8/sys/geom/geom_ctl.c
  stable/8/sys/kern/kern_descrip.c
  stable/8/sys/kern/subr_bus.c
  stable/8/sys/kern/subr_devstat.c
  stable/8/sys/kern/subr_log.c
  stable/8/sys/kern/tty.c
  stable/8/sys/kern/tty_tty.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/random/randomdev.c
==============================================================================
--- stable/8/sys/dev/random/randomdev.c	Tue Jan 18 09:52:53 2011	(r217531)
+++ stable/8/sys/dev/random/randomdev.c	Tue Jan 18 10:42:13 2011	(r217532)
@@ -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: stable/8/sys/geom/geom_ctl.c
==============================================================================
--- stable/8/sys/geom/geom_ctl.c	Tue Jan 18 09:52:53 2011	(r217531)
+++ stable/8/sys/geom/geom_ctl.c	Tue Jan 18 10:42:13 2011	(r217532)
@@ -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: stable/8/sys/kern/kern_descrip.c
==============================================================================
--- stable/8/sys/kern/kern_descrip.c	Tue Jan 18 09:52:53 2011	(r217531)
+++ stable/8/sys/kern/kern_descrip.c	Tue Jan 18 10:42:13 2011	(r217532)
@@ -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: stable/8/sys/kern/subr_bus.c
==============================================================================
--- stable/8/sys/kern/subr_bus.c	Tue Jan 18 09:52:53 2011	(r217531)
+++ stable/8/sys/kern/subr_bus.c	Tue Jan 18 10:42:13 2011	(r217532)
@@ -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: stable/8/sys/kern/subr_devstat.c
==============================================================================
--- stable/8/sys/kern/subr_devstat.c	Tue Jan 18 09:52:53 2011	(r217531)
+++ stable/8/sys/kern/subr_devstat.c	Tue Jan 18 10:42:13 2011	(r217532)
@@ -475,7 +475,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: stable/8/sys/kern/subr_log.c
==============================================================================
--- stable/8/sys/kern/subr_log.c	Tue Jan 18 09:52:53 2011	(r217531)
+++ stable/8/sys/kern/subr_log.c	Tue Jan 18 10:42:13 2011	(r217532)
@@ -247,7 +247,8 @@ static void
 log_drvinit(void *unused)
 {
 
-	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: stable/8/sys/kern/tty.c
==============================================================================
--- stable/8/sys/kern/tty.c	Tue Jan 18 09:52:53 2011	(r217531)
+++ stable/8/sys/kern/tty.c	Tue Jan 18 10:42:13 2011	(r217532)
@@ -1924,8 +1924,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: stable/8/sys/kern/tty_tty.c
==============================================================================
--- stable/8/sys/kern/tty_tty.c	Tue Jan 18 09:52:53 2011	(r217531)
+++ stable/8/sys/kern/tty_tty.c	Tue Jan 18 10:42:13 2011	(r217532)
@@ -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?201101181042.p0IAgDsL034185>