Add the plumbing so one could compile filemon(4) into a kernel.
This commit is contained in:
parent
f2ac4d0c2a
commit
db4d363da5
@ -1,4 +1,4 @@
|
||||
# $NetBSD: ALL,v 1.322 2011/10/02 16:39:47 jmcneill Exp $
|
||||
# $NetBSD: ALL,v 1.323 2011/10/15 00:23:08 sjg Exp $
|
||||
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
|
||||
#
|
||||
# ALL machine description file
|
||||
@ -17,7 +17,7 @@ include "arch/i386/conf/std.i386"
|
||||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
#ident "ALL-$Revision: 1.322 $"
|
||||
#ident "ALL-$Revision: 1.323 $"
|
||||
|
||||
maxusers 64 # estimated number of users
|
||||
|
||||
@ -1686,6 +1686,8 @@ pseudo-device bcsp # BlueCore Serial Protocol
|
||||
pseudo-device btuart # Bluetooth HCI UART (H4)
|
||||
pseudo-device gpiosim 1 # GPIO simulator
|
||||
|
||||
pseudo-device filemon # process monitor for make(1)
|
||||
|
||||
# a pseudo device needed for Coda # also needs CODA (above)
|
||||
pseudo-device vcoda 4 # coda minicache <-> venus comm.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: files,v 1.1028 2011/09/28 10:55:46 jruoho Exp $
|
||||
# $NetBSD: files,v 1.1029 2011/10/15 00:23:08 sjg Exp $
|
||||
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
|
||||
|
||||
version 20100430
|
||||
@ -1693,6 +1693,12 @@ include "netisdn/files.i4b"
|
||||
device joy
|
||||
file dev/ic/joy.c joy needs-flag
|
||||
|
||||
# process monitor for make(1)
|
||||
# normally built as module
|
||||
defpseudo filemon
|
||||
file dev/filemon/filemon.c filemon
|
||||
file dev/filemon/filemon_wrapper.c filemon
|
||||
|
||||
include "net/agr/files.agr"
|
||||
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: majors,v 1.57 2011/10/02 16:39:47 jmcneill Exp $
|
||||
# $NetBSD: majors,v 1.58 2011/10/15 00:23:08 sjg Exp $
|
||||
#
|
||||
# Device majors for Machine-Independent drivers.
|
||||
#
|
||||
@ -47,3 +47,4 @@ device-major npf char 198 npf
|
||||
device-major flash char 199 block 199 flash
|
||||
device-major dtv char 200 dtv
|
||||
device-major iic char 201 iic
|
||||
device-major filemon char 202
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: filemon.c,v 1.3 2011/07/04 23:37:30 sjg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: filemon.c,v 1.4 2011/10/15 00:23:08 sjg Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -48,7 +48,7 @@ MODULE(MODULE_CLASS_DRIVER, filemon, NULL);
|
||||
|
||||
static dev_type_open(filemon_open);
|
||||
|
||||
static struct cdevsw filemon_cdevsw = {
|
||||
struct cdevsw filemon_cdevsw = {
|
||||
.d_open = filemon_open,
|
||||
.d_flag = D_MPSAFE,
|
||||
.d_close = noclose,
|
||||
@ -302,6 +302,17 @@ filemon_load(void *dummy __unused)
|
||||
filemon_wrapper_install();
|
||||
}
|
||||
|
||||
void filemonattach(int);
|
||||
|
||||
/*
|
||||
* If this gets called we are linked into the kernel
|
||||
*/
|
||||
void
|
||||
filemonattach(int num)
|
||||
{
|
||||
filemon_load(NULL);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
filemon_unload(void)
|
||||
|
Loading…
Reference in New Issue
Block a user