Return the amount of space in the image header required by the filewriter.
Signed-off-by: Nigel Cunningham <[email protected]>
kernel/power/suspend_file.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/kernel/power/suspend_file.c b/kernel/power/suspend_file.c
index a4871c7..4f9d6f5 100644
--- a/kernel/power/suspend_file.c
+++ b/kernel/power/suspend_file.c
@@ -737,3 +737,23 @@ static int filewriter_print_debug_stats(
return len;
}
+/*
+ * Storage needed
+ *
+ * Returns amount of space in the image header required
+ * for the filewriter's data.
+ *
+ * We ensure the space is allocated, but actually save the
+ * data from write_header_init and therefore don't also define a
+ * save_config_info routine.
+ */
+static unsigned long filewriter_storage_needed(void)
+{
+ return sig_size + strlen(filewriter_target) + 1 +
+ 3 * sizeof(struct extent_iterate_saved_state) +
+ sizeof(devinfo) +
+ sizeof(struct extent_chain) - 2 * sizeof(void *) +
+ (2 * sizeof(unsigned long) *
+ (block_chain.allocs - block_chain.frees));
+}
+
--
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]