lkml.org 
[lkml]   [2006]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[Suspend2][ 22/35] [Suspend2] Filewriter debug info routine.
Date
Fill a buffer with the debugging information that the filewriter provides.

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

kernel/power/suspend_file.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/kernel/power/suspend_file.c b/kernel/power/suspend_file.c
index 4df05c8..a4871c7 100644
--- a/kernel/power/suspend_file.c
+++ b/kernel/power/suspend_file.c
@@ -714,3 +714,26 @@ out:
return result;
}

+/* Print debug info
+ *
+ * Description:
+ */
+
+static int filewriter_print_debug_stats(char *buffer, int size)
+{
+ int len = 0;
+
+ if (suspend_active_writer != &filewriterops) {
+ len = snprintf_used(buffer, size, "- Filewriter inactive.\n");
+ return len;
+ }
+
+ len = snprintf_used(buffer, size, "- Filewriter active.\n");
+
+ len+= snprintf_used(buffer+len, size-len, " Storage available for image: "
+ "%ld pages.\n",
+ filewriter_storage_allocated());
+
+ return len;
+}
+
--
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-06-27 01:03    [W:0.141 / U:2.156 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site