lkml.org 
[lkml]   [2006]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[ 09/10] [Suspend2] Append module debug info to a buffer.
Date

Append the (textual) debugging output of each non-disabled module to a
buffer. This output should be short, so we don't get carried away
supporting multiple pages of output.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

kernel/power/modules.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/kernel/power/modules.c b/kernel/power/modules.c
index 63f9dbb..9c27957 100644
--- a/kernel/power/modules.c
+++ b/kernel/power/modules.c
@@ -57,6 +57,30 @@ struct suspend_module_ops *find_module_g
return found_module;
}

+/*
+ * print_module_debug_info
+ * Functionality : Get debugging info from modules into a buffer.
+ */
+int print_module_debug_info(char *buffer, int buffer_size)
+{
+ struct suspend_module_ops *this_module;
+ int len = 0;
+
+ list_for_each_entry(this_module, &suspend_modules, module_list) {
+ if (this_module->disabled)
+ continue;
+ if (this_module->print_debug_info) {
+ int result;
+ result = this_module->print_debug_info(buffer + len,
+ buffer_size - len);
+ len += result;
+ }
+ }
+
+ return len;
+}
+
+/*
* suspend_register_module
*
* Register a module.
--
Nigel Cunningham nigel at suspend2 dot net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-01 12:46    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site