From bf73bae6ba0dc4bd4f1e570feb34a06b72725af6 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Wed, 6 Dec 2006 20:34:16 -0800 Subject: [PATCH] swsusp: update userland interface documentation The swsusp userland interface has recently changed for a couple of times, but the changes have not been documented. Fix this, and document the SNAPSHOT_SET_SWAP_AREA ioctl(). Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Documentation/power/swsusp-and-swap-files.txt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'Documentation/power/swsusp-and-swap-files.txt') diff --git a/Documentation/power/swsusp-and-swap-files.txt b/Documentation/power/swsusp-and-swap-files.txt index e171d11dc65..06f911a5f88 100644 --- a/Documentation/power/swsusp-and-swap-files.txt +++ b/Documentation/power/swsusp-and-swap-files.txt @@ -38,15 +38,21 @@ resume= resume_offset= where is the partition on which the swap file is located and is the offset of the swap header determined by the -application in 2). [Of course, this step may be carried out automatically +application in 2) (of course, this step may be carried out automatically by the same application that determies the swap file's header offset using the -FIBMAP ioctl.] +FIBMAP ioctl) + +OR + +Use a userland suspend application that will set the partition and offset +with the help of the SNAPSHOT_SET_SWAP_AREA ioctl described in +Documentation/power/userland-swsusp.txt (this is the only method to suspend +to a swap file allowing the resume to be initiated from an initrd or initramfs +image). Now, swsusp will use the swap file in the same way in which it would use a swap -partition. [Of course this means that the resume from a swap file cannot be -initiated from whithin an initrd of initramfs image.] In particular, the -swap file has to be active (ie. be present in /proc/swaps) so that it can be -used for suspending. +partition. In particular, the swap file has to be active (ie. be present in +/proc/swaps) so that it can be used for suspending. Note that if the swap file used for suspending is deleted and recreated, the location of its header need not be the same as before. Thus every time -- cgit v1.2.3