aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/power.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-10-25 18:59:31 -0400
committerLen Brown <len.brown@intel.com>2008-02-01 18:30:52 -0500
commitaf508b34d27e3341287d89e0eae6752fdb1b873f (patch)
treeb5d2a337d78dc25aadb02d481443d484e0dd368c /kernel/power/power.h
parentaa6299926950c8dfe2fea638276cad6def092bc9 (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 'kernel/power/power.h')
-rw-r--r--kernel/power/power.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/power/power.h b/kernel/power/power.h
index 2093c3a9a994..23c17031ed21 100644
--- a/kernel/power/power.h
+++ b/kernel/power/power.h
@@ -128,6 +128,7 @@ struct snapshot_handle {
128#define data_of(handle) ((handle).buffer + (handle).buf_offset) 128#define data_of(handle) ((handle).buffer + (handle).buf_offset)
129 129
130extern unsigned int snapshot_additional_pages(struct zone *zone); 130extern unsigned int snapshot_additional_pages(struct zone *zone);
131extern unsigned long snapshot_get_image_size(void);
131extern int snapshot_read_next(struct snapshot_handle *handle, size_t count); 132extern int snapshot_read_next(struct snapshot_handle *handle, size_t count);
132extern int snapshot_write_next(struct snapshot_handle *handle, size_t count); 133extern int snapshot_write_next(struct snapshot_handle *handle, size_t count);
133extern void snapshot_write_finalize(struct snapshot_handle *handle); 134extern void snapshot_write_finalize(struct snapshot_handle *handle);
@@ -158,7 +159,8 @@ struct resume_swap_area {
158#define SNAPSHOT_PMOPS _IOW(SNAPSHOT_IOC_MAGIC, 12, unsigned int) 159#define SNAPSHOT_PMOPS _IOW(SNAPSHOT_IOC_MAGIC, 12, unsigned int)
159#define SNAPSHOT_SET_SWAP_AREA _IOW(SNAPSHOT_IOC_MAGIC, 13, \ 160#define SNAPSHOT_SET_SWAP_AREA _IOW(SNAPSHOT_IOC_MAGIC, 13, \
160 struct resume_swap_area) 161 struct resume_swap_area)
161#define SNAPSHOT_IOC_MAXNR 13 162#define SNAPSHOT_GET_IMAGE_SIZE _IOR(SNAPSHOT_IOC_MAGIC, 14, loff_t)
163#define SNAPSHOT_IOC_MAXNR 14
162 164
163#define PMOPS_PREPARE 1 165#define PMOPS_PREPARE 1
164#define PMOPS_ENTER 2 166#define PMOPS_ENTER 2