summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_snoop.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-08-23 20:59:21 +0000
committerphk <phk@FreeBSD.org>1999-08-23 20:59:21 +0000
commit663cbe4fc26065f7af7d10faaee492a626156145 (patch)
tree32e619fadb473bfb85ff8e06044176f2ff323cce /sys/kern/tty_snoop.c
parent2a5ff1f726f814a9e4717afe3f14250f8030cace (diff)
downloadFreeBSD-src-663cbe4fc26065f7af7d10faaee492a626156145.zip
FreeBSD-src-663cbe4fc26065f7af7d10faaee492a626156145.tar.gz
Convert DEVFS hooks in (most) drivers to make_dev().
Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev().
Diffstat (limited to 'sys/kern/tty_snoop.c')
-rw-r--r--sys/kern/tty_snoop.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/sys/kern/tty_snoop.c b/sys/kern/tty_snoop.c
index 936ce92..0e7bf1a 100644
--- a/sys/kern/tty_snoop.c
+++ b/sys/kern/tty_snoop.c
@@ -12,7 +12,7 @@
*
* Snoop stuff.
*
- * $Id$
+ * $Id: tty_snoop.c,v 1.40 1999/06/17 23:42:44 gpalmer Exp $
*/
#include "snp.h"
@@ -20,8 +20,6 @@
#if NSNP > 0
#include "opt_compat.h"
-#include "opt_devfs.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/filio.h>
@@ -34,9 +32,6 @@
#include <sys/conf.h>
#include <sys/poll.h>
#include <sys/kernel.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
#include <sys/snoop.h>
#include <sys/vnode.h>
@@ -521,31 +516,17 @@ snppoll(dev, events, p)
return (revents);
}
-#ifdef DEVFS
-static void *snp_devfs_token[NSNP];
-#endif
-static int snp_devsw_installed;
-
static void snp_drvinit __P((void *unused));
+
static void
snp_drvinit(unused)
void *unused;
{
-#ifdef DEVFS
int i;
-#endif
- if( ! snp_devsw_installed ) {
- cdevsw_add(&snp_cdevsw);
- snp_devsw_installed = 1;
-#ifdef DEVFS
- for ( i = 0 ; i < NSNP ; i++) {
- snp_devfs_token[i] =
- devfs_add_devswf(&snp_cdevsw, i, DV_CHR, 0, 0,
- 0600, "snp%d", i);
- }
-#endif
- }
+ cdevsw_add(&snp_cdevsw);
+ for ( i = 0 ; i < NSNP ; i++)
+ make_dev(&snp_cdevsw, i, 0, 0, 0600, "snp%d", i);
}
SYSINIT(snpdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,snp_drvinit,NULL)
OpenPOWER on IntegriCloud