lkml.org 
[lkml]   [2006]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[Suspend2][ 04/13] [Suspend2] Utility function for testing storage managers.
Date
Provide a means whereby a developer (via a proc entry) can test a storage
manager. Invoke the prepare, activate, deactivate and cleanup routines in
that order.

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

kernel/power/storage.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/kernel/power/storage.c b/kernel/power/storage.c
index 71b8c02..c007a8e 100644
--- a/kernel/power/storage.c
+++ b/kernel/power/storage.c
@@ -130,3 +130,21 @@ int suspend_deactivate_storage(int force
return 0;
}

+#ifdef CONFIG_PM_DEBUG
+static void storage_manager_simulate(void)
+{
+ printk("--- Storage manager simulate ---\n");
+ suspend_prepare_usm();
+ schedule();
+ printk("--- Activate storage 1 ---\n");
+ suspend_activate_storage(1);
+ schedule();
+ printk("--- Deactivate storage 1 ---\n");
+ suspend_deactivate_storage(1);
+ schedule();
+ printk("--- Cleanup usm ---\n");
+ suspend_cleanup_usm();
+ schedule();
+ printk("--- Storage manager simulate ends ---\n");
+}
+#endif
--
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 07:01    [from the cache]
©2003-2011 Jasper Spaans