summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_log.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/subr_log.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/subr_log.c')
-rw-r--r--sys/kern/subr_log.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c
index 9f6b84f..7272789 100644
--- a/sys/kern/subr_log.c
+++ b/sys/kern/subr_log.c
@@ -31,15 +31,13 @@
* SUCH DAMAGE.
*
* @(#)subr_log.c 8.1 (Berkeley) 6/10/93
- * $Id: subr_log.c,v 1.35 1999/05/30 16:52:56 phk Exp $
+ * $Id: subr_log.c,v 1.36 1999/05/31 11:27:35 phk Exp $
*/
/*
* Error log buffer for kernel printf's.
*/
-#include "opt_devfs.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
@@ -52,9 +50,6 @@
#include <sys/kernel.h>
#include <sys/poll.h>
#include <sys/filedesc.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
#define LOG_RDPRI (PZERO + 1)
@@ -264,26 +259,14 @@ logioctl(dev, com, data, flag, p)
return (0);
}
-static int log_devsw_installed;
-#ifdef DEVFS
-static void *log_devfs_token;
-#endif
static void log_drvinit __P((void *unused));
+
static void
log_drvinit(unused)
void *unused;
{
-
- if( ! log_devsw_installed ) {
- cdevsw_add(&log_cdevsw);
- log_devsw_installed = 1;
-#ifdef DEVFS
- log_devfs_token = devfs_add_devswf(&log_cdevsw, 0, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600,
- "klog");
-#endif
- }
+ make_dev(&log_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "klog");
}
SYSINIT(logdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,log_drvinit,NULL)
OpenPOWER on IntegriCloud