Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Oct 2011 08:09:45 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r226500 - in head/sys: dev/gpio dev/ksyms dev/vkbd net security/audit sys
Message-ID:  <201110180809.p9I89jVU063103@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Tue Oct 18 08:09:44 2011
New Revision: 226500
URL: http://svn.freebsd.org/changeset/base/226500

Log:
  Get rid of D_PSEUDO.
  
  It seems the D_PSEUDO flag was meant to allow make_dev() to return NULL.
  Nowadays we have a different interface for that; make_dev_p(). There's
  no need to keep it there.
  
  While there, remove an unneeded D_NEEDMINOR from the gpio driver.
  
  Discussed with:	gonzo@ (gpio)

Modified:
  head/sys/dev/gpio/gpioc.c
  head/sys/dev/ksyms/ksyms.c
  head/sys/dev/vkbd/vkbd.c
  head/sys/net/if_tap.c
  head/sys/net/if_tun.c
  head/sys/security/audit/audit_pipe.c
  head/sys/sys/conf.h

Modified: head/sys/dev/gpio/gpioc.c
==============================================================================
--- head/sys/dev/gpio/gpioc.c	Tue Oct 18 07:54:22 2011	(r226499)
+++ head/sys/dev/gpio/gpioc.c	Tue Oct 18 08:09:44 2011	(r226500)
@@ -61,9 +61,6 @@ static struct cdevsw gpioc_cdevsw = {
 	.d_version	= D_VERSION,
 	.d_ioctl	= gpioc_ioctl,
 	.d_name		= "gpioc",
-#if __FreeBSD_version >= 800039
-	.d_flags	= D_PSEUDO | D_NEEDMINOR
-#endif
 };
 
 struct gpioc_softc {

Modified: head/sys/dev/ksyms/ksyms.c
==============================================================================
--- head/sys/dev/ksyms/ksyms.c	Tue Oct 18 07:54:22 2011	(r226499)
+++ head/sys/dev/ksyms/ksyms.c	Tue Oct 18 08:09:44 2011	(r226500)
@@ -74,7 +74,7 @@ static	d_mmap_t	ksyms_mmap;
 
 static struct cdevsw ksyms_cdevsw = {
     .d_version	=	D_VERSION,
-    .d_flags	=	D_PSEUDO | D_TRACKCLOSE,
+    .d_flags	=	D_TRACKCLOSE,
     .d_open	=	ksyms_open,
     .d_close	=	ksyms_close,
     .d_read	=	ksyms_read,

Modified: head/sys/dev/vkbd/vkbd.c
==============================================================================
--- head/sys/dev/vkbd/vkbd.c	Tue Oct 18 07:54:22 2011	(r226499)
+++ head/sys/dev/vkbd/vkbd.c	Tue Oct 18 08:09:44 2011	(r226500)
@@ -158,7 +158,7 @@ static int		vkbd_data_read(vkbd_state_t 
 
 static struct cdevsw	vkbd_dev_cdevsw = {
 	.d_version =	D_VERSION,
-	.d_flags =	D_PSEUDO | D_NEEDGIANT | D_NEEDMINOR,
+	.d_flags =	D_NEEDGIANT | D_NEEDMINOR,
 	.d_open =	vkbd_dev_open,
 	.d_close =	vkbd_dev_close,
 	.d_read =	vkbd_dev_read,

Modified: head/sys/net/if_tap.c
==============================================================================
--- head/sys/net/if_tap.c	Tue Oct 18 07:54:22 2011	(r226499)
+++ head/sys/net/if_tap.c	Tue Oct 18 08:09:44 2011	(r226500)
@@ -132,7 +132,7 @@ static struct filterops	tap_write_filter
 
 static struct cdevsw	tap_cdevsw = {
 	.d_version =	D_VERSION,
-	.d_flags =	D_PSEUDO | D_NEEDMINOR,
+	.d_flags =	D_NEEDMINOR,
 	.d_open =	tapopen,
 	.d_close =	tapclose,
 	.d_read =	tapread,

Modified: head/sys/net/if_tun.c
==============================================================================
--- head/sys/net/if_tun.c	Tue Oct 18 07:54:22 2011	(r226499)
+++ head/sys/net/if_tun.c	Tue Oct 18 08:09:44 2011	(r226500)
@@ -165,7 +165,7 @@ static struct filterops tun_write_filter
 
 static struct cdevsw tun_cdevsw = {
 	.d_version =	D_VERSION,
-	.d_flags =	D_PSEUDO | D_NEEDMINOR,
+	.d_flags =	D_NEEDMINOR,
 	.d_open =	tunopen,
 	.d_close =	tunclose,
 	.d_read =	tunread,

Modified: head/sys/security/audit/audit_pipe.c
==============================================================================
--- head/sys/security/audit/audit_pipe.c	Tue Oct 18 07:54:22 2011	(r226499)
+++ head/sys/security/audit/audit_pipe.c	Tue Oct 18 08:09:44 2011	(r226500)
@@ -231,7 +231,7 @@ static d_kqfilter_t	audit_pipe_kqfilter;
 
 static struct cdevsw	audit_pipe_cdevsw = {
 	.d_version =	D_VERSION,
-	.d_flags =	D_PSEUDO | D_NEEDMINOR,
+	.d_flags =	D_NEEDMINOR,
 	.d_open =	audit_pipe_open,
 	.d_close =	audit_pipe_close,
 	.d_read =	audit_pipe_read,

Modified: head/sys/sys/conf.h
==============================================================================
--- head/sys/sys/conf.h	Tue Oct 18 07:54:22 2011	(r226499)
+++ head/sys/sys/conf.h	Tue Oct 18 08:09:44 2011	(r226500)
@@ -168,7 +168,6 @@ typedef int dumper_t(
  */
 #define	D_TRACKCLOSE	0x00080000	/* track all closes */
 #define	D_MMAP_ANON	0x00100000	/* special treatment in vm_mmap.c */
-#define	D_PSEUDO	0x00200000	/* make_dev() can return NULL */
 #define	D_NEEDGIANT	0x00400000	/* driver want Giant */
 #define	D_NEEDMINOR	0x00800000	/* driver uses clone_create() */
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110180809.p9I89jVU063103>