[Suspend2][ 10/13] [Suspend2] Storage manager proc entries.

From: Nigel Cunningham
Date: Tue Jun 27 2006 - 00:52:21 EST


Define the proc entries for the storage manager - there are entries for
disabling the manager, setting the program, manually activating and
simulating an atomic copy.

Signed-off-by: Nigel Cunningham <nigel@xxxxxxxxxxxx>

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

diff --git a/kernel/power/storage.c b/kernel/power/storage.c
index aa140ea..c8f85db 100644
--- a/kernel/power/storage.c
+++ b/kernel/power/storage.c
@@ -236,3 +236,51 @@ static void storage_manager_activate(voi
storage_manager_last_action = storage_manager_action;
}

+/*
+ * User interface specific /proc/suspend entries.
+ */
+
+static struct suspend_proc_data proc_params[] = {
+ { .filename = "disable_storage_manager",
+ .permissions = PROC_RW,
+ .type = SUSPEND_PROC_DATA_INTEGER,
+ .data = {
+ .integer = {
+ .variable = &usm_ops.disabled,
+ .minimum = 0,
+ .maximum = 1,
+ }
+ }
+ },
+ { .filename = "storage_manager",
+ .permissions = PROC_RW,
+ .type = SUSPEND_PROC_DATA_STRING,
+ .data = {
+ .string = {
+ .variable = usm_helper_data.program,
+ .max_length = 254,
+ }
+ }
+ },
+ { .filename = "activate_storage",
+ .permissions = PROC_RW,
+ .type = SUSPEND_PROC_DATA_INTEGER,
+ .data = {
+ .integer = {
+ .variable = &storage_manager_action,
+ .minimum = 0,
+ .maximum = 1,
+ }
+ },
+ .write_proc = storage_manager_activate,
+ },
+
+#ifdef CONFIG_PM_DEBUG
+ { .filename = "simulate_atomic_copy",
+ .permissions = PROC_RW,
+ .type = SUSPEND_PROC_DATA_NONE,
+ .write_proc = storage_manager_simulate,
+ }
+#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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/