]> Pileus Git - ~andy/linux/commitdiff
dccp: Toggle debug output without module unloading
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Sat, 23 Aug 2008 11:28:27 +0000 (13:28 +0200)
committerGerrit Renker <gerrit@erg.abdn.ac.uk>
Wed, 27 Aug 2008 05:22:00 +0000 (07:22 +0200)
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>
net/dccp/ccids/ccid2.c
net/dccp/ccids/ccid3.c
net/dccp/ccids/lib/tfrc.c
net/dccp/proto.c

index 8e9580874216aff323c42d9b43cf8517027e7ed5..9a430734530c6d8bd2079ca7c1662d03b221ad73 100644 (file)
@@ -783,7 +783,7 @@ static struct ccid_operations ccid2 = {
 };
 
 #ifdef CONFIG_IP_DCCP_CCID2_DEBUG
-module_param(ccid2_debug, bool, 0444);
+module_param(ccid2_debug, bool, 0644);
 MODULE_PARM_DESC(ccid2_debug, "Enable debug messages");
 #endif
 
index f6756e0c9e6989a8884493464a61bcd621c7880d..3b8bd7ca6761f2bded8aaae9bf21efa4cc8b2fac 100644 (file)
@@ -963,7 +963,7 @@ static struct ccid_operations ccid3 = {
 };
 
 #ifdef CONFIG_IP_DCCP_CCID3_DEBUG
-module_param(ccid3_debug, bool, 0444);
+module_param(ccid3_debug, bool, 0644);
 MODULE_PARM_DESC(ccid3_debug, "Enable debug messages");
 #endif
 
index 97ecec0a8e769b2ddc13d927f7bf632895fcccfd..185916218e07161ecec75fbd6095dfbfd32c23e0 100644 (file)
@@ -10,7 +10,7 @@
 
 #ifdef CONFIG_IP_DCCP_TFRC_DEBUG
 int tfrc_debug;
-module_param(tfrc_debug, bool, 0444);
+module_param(tfrc_debug, bool, 0644);
 MODULE_PARM_DESC(tfrc_debug, "Enable debug messages");
 #endif
 
index ae66473b11fad5b8f3166b63fe82470d86ca5a20..d0bd34819761c0983074e54fbff360d0aed75963 100644 (file)
@@ -1030,7 +1030,7 @@ MODULE_PARM_DESC(thash_entries, "Number of ehash buckets");
 
 #ifdef CONFIG_IP_DCCP_DEBUG
 int dccp_debug;
-module_param(dccp_debug, bool, 0444);
+module_param(dccp_debug, bool, 0644);
 MODULE_PARM_DESC(dccp_debug, "Enable debug messages");
 
 EXPORT_SYMBOL_GPL(dccp_debug);