summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-05-16 08:25:55 +0000
committerglebius <glebius@FreeBSD.org>2005-05-16 08:25:55 +0000
commit39c7c362d1ad10a0931495b45d815445da167ce2 (patch)
tree94bdb2e5b06266fdeb2b0f783944dcfc4213d8dd
parentc2bb227a08da7ac74c03baf7d915258be41c3578 (diff)
downloadFreeBSD-src-39c7c362d1ad10a0931495b45d815445da167ce2.zip
FreeBSD-src-39c7c362d1ad10a0931495b45d815445da167ce2.tar.gz
Make NETGRAPH_DEBUG a kernel option, so that it can't be turned off
without hacking source. In collaboration with: ru, julian
-rw-r--r--sys/conf/NOTES5
-rw-r--r--sys/conf/options1
-rw-r--r--sys/modules/netgraph/Makefile.inc2
-rw-r--r--sys/netgraph/netgraph.h4
4 files changed, 10 insertions, 2 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index adc4149..02f2930 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -501,7 +501,10 @@ options ALTQ_DEBUG
# will automatically load the corresponding KLD module if the node type
# is not already compiled into the kernel. Each type below has a
# corresponding man page, e.g., ng_async(8).
-options NETGRAPH #netgraph(4) system
+options NETGRAPH # netgraph(4) system
+options NETGRAPH_DEBUG # enable extra debugging, this
+ # affects netgraph(4) and nodes
+# Node types
options NETGRAPH_ASYNC
options NETGRAPH_ATMLLC
options NETGRAPH_ATM_ATMPIF
diff --git a/sys/conf/options b/sys/conf/options
index bdc4e40..ba322b6 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -379,6 +379,7 @@ XBONEHACK
# or loaded dynamically. To get the former, include the corresponding
# option below. Each type has its own man page, e.g. ng_async(4).
NETGRAPH
+NETGRAPH_DEBUG opt_netgraph.h
NETGRAPH_ASYNC opt_netgraph.h
NETGRAPH_ATMLLC opt_netgraph.h
NETGRAPH_ATM_ATMPIF opt_netgraph.h
diff --git a/sys/modules/netgraph/Makefile.inc b/sys/modules/netgraph/Makefile.inc
index 114bba7..3d2fd19 100644
--- a/sys/modules/netgraph/Makefile.inc
+++ b/sys/modules/netgraph/Makefile.inc
@@ -3,4 +3,6 @@
.PATH: ${.CURDIR}/../../../netgraph
+SRCS+= opt_netgraph.h
+
.include "../Makefile.inc"
diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h
index 61b575a..53f1cf2 100644
--- a/sys/netgraph/netgraph.h
+++ b/sys/netgraph/netgraph.h
@@ -53,8 +53,10 @@
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/mutex.h>
+
+#include "opt_netgraph.h"
+
/* debugging options */
-#define NETGRAPH_DEBUG
#define NG_SEPARATE_MALLOC /* make modules use their own malloc types */
/*
OpenPOWER on IntegriCloud