diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-08-23 07:28:27 -0400 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-08-27 01:22:00 -0400 |
commit | 157439fa4a9b38ac4ce41e2fc379fc5031affec8 (patch) | |
tree | bed4712df1c51b32fe53a63bd1d1a17a7db4eca1 /net | |
parent | b569d5a134074d4e15ab8e26cf2dd9f02c29fadc (diff) |
dccp: Toggle debug output without module unloading
This sets the sysfs permissions so that root can toggle the `debug'
parameter available for nearly every DCCP module. This is useful
since there are various module inter-dependencies. The debug flag
can now be toggled at runtime using
echo 1 > /sys/module/dccp/parameters/dccp_debug
echo 1 > /sys/module/dccp_ccid2/parameters/ccid2_debug
echo 1 > /sys/module/dccp_ccid3/parameters/ccid3_debug
echo 1 > /sys/module/dccp_tfrc_lib/parameters/tfrc_debug
The last is not very useful yet, since no code at the moment calls
the tfrc_debug() macro.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'net')
-rw-r--r-- | net/dccp/ccids/ccid2.c | 2 | ||||
-rw-r--r-- | net/dccp/ccids/ccid3.c | 2 | ||||
-rw-r--r-- | net/dccp/ccids/lib/tfrc.c | 2 | ||||
-rw-r--r-- | net/dccp/proto.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index 8e9580874216..9a430734530c 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c | |||
@@ -783,7 +783,7 @@ static struct ccid_operations ccid2 = { | |||
783 | }; | 783 | }; |
784 | 784 | ||
785 | #ifdef CONFIG_IP_DCCP_CCID2_DEBUG | 785 | #ifdef CONFIG_IP_DCCP_CCID2_DEBUG |
786 | module_param(ccid2_debug, bool, 0444); | 786 | module_param(ccid2_debug, bool, 0644); |
787 | MODULE_PARM_DESC(ccid2_debug, "Enable debug messages"); | 787 | MODULE_PARM_DESC(ccid2_debug, "Enable debug messages"); |
788 | #endif | 788 | #endif |
789 | 789 | ||
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index f6756e0c9e69..3b8bd7ca6761 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -963,7 +963,7 @@ static struct ccid_operations ccid3 = { | |||
963 | }; | 963 | }; |
964 | 964 | ||
965 | #ifdef CONFIG_IP_DCCP_CCID3_DEBUG | 965 | #ifdef CONFIG_IP_DCCP_CCID3_DEBUG |
966 | module_param(ccid3_debug, bool, 0444); | 966 | module_param(ccid3_debug, bool, 0644); |
967 | MODULE_PARM_DESC(ccid3_debug, "Enable debug messages"); | 967 | MODULE_PARM_DESC(ccid3_debug, "Enable debug messages"); |
968 | #endif | 968 | #endif |
969 | 969 | ||
diff --git a/net/dccp/ccids/lib/tfrc.c b/net/dccp/ccids/lib/tfrc.c index 97ecec0a8e76..185916218e07 100644 --- a/net/dccp/ccids/lib/tfrc.c +++ b/net/dccp/ccids/lib/tfrc.c | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | #ifdef CONFIG_IP_DCCP_TFRC_DEBUG | 11 | #ifdef CONFIG_IP_DCCP_TFRC_DEBUG |
12 | int tfrc_debug; | 12 | int tfrc_debug; |
13 | module_param(tfrc_debug, bool, 0444); | 13 | module_param(tfrc_debug, bool, 0644); |
14 | MODULE_PARM_DESC(tfrc_debug, "Enable debug messages"); | 14 | MODULE_PARM_DESC(tfrc_debug, "Enable debug messages"); |
15 | #endif | 15 | #endif |
16 | 16 | ||
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index ae66473b11fa..d0bd34819761 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -1030,7 +1030,7 @@ MODULE_PARM_DESC(thash_entries, "Number of ehash buckets"); | |||
1030 | 1030 | ||
1031 | #ifdef CONFIG_IP_DCCP_DEBUG | 1031 | #ifdef CONFIG_IP_DCCP_DEBUG |
1032 | int dccp_debug; | 1032 | int dccp_debug; |
1033 | module_param(dccp_debug, bool, 0444); | 1033 | module_param(dccp_debug, bool, 0644); |
1034 | MODULE_PARM_DESC(dccp_debug, "Enable debug messages"); | 1034 | MODULE_PARM_DESC(dccp_debug, "Enable debug messages"); |
1035 | 1035 | ||
1036 | EXPORT_SYMBOL_GPL(dccp_debug); | 1036 | EXPORT_SYMBOL_GPL(dccp_debug); |