diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-10-25 18:59:31 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-02-01 18:30:52 -0500 |
commit | af508b34d27e3341287d89e0eae6752fdb1b873f (patch) | |
tree | b5d2a337d78dc25aadb02d481443d484e0dd368c /Documentation | |
parent | aa6299926950c8dfe2fea638276cad6def092bc9 (diff) |
Hibernation: Introduce SNAPSHOT_GET_IMAGE_SIZE ioctl
Add a new ioctl, SNAPSHOT_GET_IMAGE_SIZE, returning the size of the (just
created) hibernation image, to the hibernation userland interface.
This ioctl is necessary so that the userland utilities using the interface need
not access the hibernation image header, owned by the kernel, in order to obtain
the size of the image.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/power/userland-swsusp.txt | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Documentation/power/userland-swsusp.txt b/Documentation/power/userland-swsusp.txt index e00c6cf09e85..32f187479697 100644 --- a/Documentation/power/userland-swsusp.txt +++ b/Documentation/power/userland-swsusp.txt | |||
@@ -54,6 +54,8 @@ SNAPSHOT_SET_IMAGE_SIZE - set the preferred maximum size of the image | |||
54 | this number, but if it turns out to be impossible, the kernel will | 54 | this number, but if it turns out to be impossible, the kernel will |
55 | create the smallest image possible) | 55 | create the smallest image possible) |
56 | 56 | ||
57 | SNAPSHOT_GET_IMAGE_SIZE - return the actual size of the hibernation image | ||
58 | |||
57 | SNAPSHOT_AVAIL_SWAP - return the amount of available swap in bytes (the last | 59 | SNAPSHOT_AVAIL_SWAP - return the amount of available swap in bytes (the last |
58 | argument should be a pointer to an unsigned int variable that will | 60 | argument should be a pointer to an unsigned int variable that will |
59 | contain the result if the call is successful). | 61 | contain the result if the call is successful). |
@@ -136,13 +138,9 @@ required, as they can use, for example, a special (blank) suspend partition or | |||
136 | a file on a partition that is unmounted before SNAPSHOT_ATOMIC_SNAPSHOT and | 138 | a file on a partition that is unmounted before SNAPSHOT_ATOMIC_SNAPSHOT and |
137 | mounted afterwards. | 139 | mounted afterwards. |
138 | 140 | ||
139 | These utilities SHOULD NOT make any assumptions regarding the ordering of | 141 | These utilities MUST NOT make any assumptions regarding the ordering of |
140 | data within the snapshot image, except for the image header that MAY be | 142 | data within the snapshot image. The contents of the image are entirely owned |
141 | assumed to start with an swsusp_info structure, as specified in | 143 | by the kernel and its structure may be changed in future kernel releases. |
142 | kernel/power/power.h. This structure MAY be used by the userland utilities | ||
143 | to obtain some information about the snapshot image, such as the size | ||
144 | of the snapshot image, including the metadata and the header itself, | ||
145 | contained in the .size member of swsusp_info. | ||
146 | 144 | ||
147 | The snapshot image MUST be written to the kernel unaltered (ie. all of the image | 145 | The snapshot image MUST be written to the kernel unaltered (ie. all of the image |
148 | data, metadata and header MUST be written in _exactly_ the same amount, form | 146 | data, metadata and header MUST be written in _exactly_ the same amount, form |