[Suspend2][ 06/13] [Suspend2] Serialise storage manager config in an image header.
From: Nigel Cunningham
Date: Tue Jun 27 2006 - 00:56:06 EST
Routines to read and write the storage manager configuration.
Signed-off-by: Nigel Cunningham <nigel@xxxxxxxxxxxx>
kernel/power/storage.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/kernel/power/storage.c b/kernel/power/storage.c
index 5fdcadd..714e95e 100644
--- a/kernel/power/storage.c
+++ b/kernel/power/storage.c
@@ -154,3 +154,19 @@ static unsigned long usm_storage_needed(
return strlen(usm_helper_data.program);
}
+static int usm_save_config_info(char *buf)
+{
+ int len = strlen(usm_helper_data.program);
+ memcpy(buf, usm_helper_data.program, len);
+ return len;
+}
+
+static void usm_load_config_info(char *buf, int size)
+{
+ /* Don't load the saved path if one has already been set */
+ if (usm_helper_data.program[0])
+ return;
+
+ memcpy(usm_helper_data.program, buf, size);
+}
+
--
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/