Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Add the plumbing so one could compile filemon(4) into a ...
details: https://anonhg.NetBSD.org/src/rev/642475cb1040
branches: trunk
changeset: 770373:642475cb1040
user: sjg <sjg%NetBSD.org@localhost>
date: Sat Oct 15 00:23:08 2011 +0000
description:
Add the plumbing so one could compile filemon(4) into a kernel.
diffstat:
sys/arch/i386/conf/ALL | 6 ++++--
sys/conf/files | 8 +++++++-
sys/conf/majors | 3 ++-
sys/dev/filemon/filemon.c | 15 +++++++++++++--
4 files changed, 26 insertions(+), 6 deletions(-)
diffs (102 lines):
diff -r 0900a83948b6 -r 642475cb1040 sys/arch/i386/conf/ALL
--- a/sys/arch/i386/conf/ALL Fri Oct 14 22:42:01 2011 +0000
+++ b/sys/arch/i386/conf/ALL Sat Oct 15 00:23:08 2011 +0000
@@ -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 @@
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 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.
diff -r 0900a83948b6 -r 642475cb1040 sys/conf/files
--- a/sys/conf/files Fri Oct 14 22:42:01 2011 +0000
+++ b/sys/conf/files Sat Oct 15 00:23:08 2011 +0000
@@ -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 @@
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"
#
diff -r 0900a83948b6 -r 642475cb1040 sys/conf/majors
--- a/sys/conf/majors Fri Oct 14 22:42:01 2011 +0000
+++ b/sys/conf/majors Sat Oct 15 00:23:08 2011 +0000
@@ -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 flash char 199 block 199 flash
device-major dtv char 200 dtv
device-major iic char 201 iic
+device-major filemon char 202
diff -r 0900a83948b6 -r 642475cb1040 sys/dev/filemon/filemon.c
--- a/sys/dev/filemon/filemon.c Fri Oct 14 22:42:01 2011 +0000
+++ b/sys/dev/filemon/filemon.c Sat Oct 15 00:23:08 2011 +0000
@@ -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 @@
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_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)
Home |
Main Index |
Thread Index |
Old Index