[Suspend2][ 04/13] [Suspend2] Utility function for testing storage managers.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux