blob: b011d93f642fdf959426a64092a34d53cab39535 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _LINUX_SUSPEND_IOCTLS_H
20#define _LINUX_SUSPEND_IOCTLS_H
21#include <linux/types.h>
22struct resume_swap_area {
Tao Baod7db5942015-01-28 10:07:51 -080023 __kernel_loff_t offset;
24 __u32 dev;
Ben Cheng655a7c02013-10-16 16:09:24 -070025} __attribute__((packed));
26#define SNAPSHOT_IOC_MAGIC '3'
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define SNAPSHOT_FREEZE _IO(SNAPSHOT_IOC_MAGIC, 1)
28#define SNAPSHOT_UNFREEZE _IO(SNAPSHOT_IOC_MAGIC, 2)
29#define SNAPSHOT_ATOMIC_RESTORE _IO(SNAPSHOT_IOC_MAGIC, 4)
30#define SNAPSHOT_FREE _IO(SNAPSHOT_IOC_MAGIC, 5)
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define SNAPSHOT_FREE_SWAP_PAGES _IO(SNAPSHOT_IOC_MAGIC, 9)
32#define SNAPSHOT_S2RAM _IO(SNAPSHOT_IOC_MAGIC, 11)
Tao Baod7db5942015-01-28 10:07:51 -080033#define SNAPSHOT_SET_SWAP_AREA _IOW(SNAPSHOT_IOC_MAGIC, 13, struct resume_swap_area)
Ben Cheng655a7c02013-10-16 16:09:24 -070034#define SNAPSHOT_GET_IMAGE_SIZE _IOR(SNAPSHOT_IOC_MAGIC, 14, __kernel_loff_t)
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define SNAPSHOT_PLATFORM_SUPPORT _IO(SNAPSHOT_IOC_MAGIC, 15)
36#define SNAPSHOT_POWER_OFF _IO(SNAPSHOT_IOC_MAGIC, 16)
37#define SNAPSHOT_CREATE_IMAGE _IOW(SNAPSHOT_IOC_MAGIC, 17, int)
38#define SNAPSHOT_PREF_IMAGE_SIZE _IO(SNAPSHOT_IOC_MAGIC, 18)
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define SNAPSHOT_AVAIL_SWAP_SIZE _IOR(SNAPSHOT_IOC_MAGIC, 19, __kernel_loff_t)
40#define SNAPSHOT_ALLOC_SWAP_PAGE _IOR(SNAPSHOT_IOC_MAGIC, 20, __kernel_loff_t)
41#define SNAPSHOT_IOC_MAXNR 20
42#endif