Initialise the filewriter at the beginning of some work.
Signed-off-by: Nigel Cunningham <[email protected]>
kernel/power/suspend_file.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/kernel/power/suspend_file.c b/kernel/power/suspend_file.c
index d0730fc..ad35967 100644
--- a/kernel/power/suspend_file.c
+++ b/kernel/power/suspend_file.c
@@ -1013,3 +1013,29 @@ static void filewriter_load_config_info(
strcpy(filewriter_target, buffer);
}
+static int filewriter_initialise(int starting_cycle)
+{
+ int result = 0;
+
+ if (starting_cycle) {
+ if (suspend_active_writer != &filewriterops)
+ return 0;
+
+ if (!*filewriter_target) {
+ printk("Filewriter is the active writer, but no filename has been set.\n");
+ return 1;
+ }
+ }
+
+ if (filewriter_target)
+ filewriter_get_target_info(filewriter_target, starting_cycle, 0);
+
+ if (starting_cycle && (filewriter_image_exists() == -1)) {
+ printk("%s is does not have a valid signature for suspending.\n",
+ filewriter_target);
+ result = 1;
+ }
+
+ return result;
+}
+
--
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]