1*53ee8cc1Swenshuai.xi #ifndef _LINUX_SUSPEND_IOCTLS_H 2*53ee8cc1Swenshuai.xi #define _LINUX_SUSPEND_IOCTLS_H 3*53ee8cc1Swenshuai.xi 4*53ee8cc1Swenshuai.xi /* 5*53ee8cc1Swenshuai.xi * This structure is used to pass the values needed for the identification 6*53ee8cc1Swenshuai.xi * of the resume swap area from a user space to the kernel via the 7*53ee8cc1Swenshuai.xi * SNAPSHOT_SET_SWAP_AREA ioctl 8*53ee8cc1Swenshuai.xi */ 9*53ee8cc1Swenshuai.xi struct resume_swap_area { 10*53ee8cc1Swenshuai.xi loff_t offset; 11*53ee8cc1Swenshuai.xi u_int32_t dev; 12*53ee8cc1Swenshuai.xi } __attribute__((packed)); 13*53ee8cc1Swenshuai.xi 14*53ee8cc1Swenshuai.xi #define SNAPSHOT_IOC_MAGIC '3' 15*53ee8cc1Swenshuai.xi #define SNAPSHOT_FREEZE _IO(SNAPSHOT_IOC_MAGIC, 1) 16*53ee8cc1Swenshuai.xi #define SNAPSHOT_UNFREEZE _IO(SNAPSHOT_IOC_MAGIC, 2) 17*53ee8cc1Swenshuai.xi #define SNAPSHOT_ATOMIC_RESTORE _IO(SNAPSHOT_IOC_MAGIC, 4) 18*53ee8cc1Swenshuai.xi #define SNAPSHOT_FREE _IO(SNAPSHOT_IOC_MAGIC, 5) 19*53ee8cc1Swenshuai.xi #define SNAPSHOT_FREE_SWAP_PAGES _IO(SNAPSHOT_IOC_MAGIC, 9) 20*53ee8cc1Swenshuai.xi #define SNAPSHOT_S2RAM _IO(SNAPSHOT_IOC_MAGIC, 11) 21*53ee8cc1Swenshuai.xi #define SNAPSHOT_SET_SWAP_AREA _IOW(SNAPSHOT_IOC_MAGIC, 13, \ 22*53ee8cc1Swenshuai.xi struct resume_swap_area) 23*53ee8cc1Swenshuai.xi #define SNAPSHOT_GET_IMAGE_SIZE _IOR(SNAPSHOT_IOC_MAGIC, 14, loff_t) 24*53ee8cc1Swenshuai.xi #define SNAPSHOT_PLATFORM_SUPPORT _IO(SNAPSHOT_IOC_MAGIC, 15) 25*53ee8cc1Swenshuai.xi #define SNAPSHOT_POWER_OFF _IO(SNAPSHOT_IOC_MAGIC, 16) 26*53ee8cc1Swenshuai.xi #define SNAPSHOT_CREATE_IMAGE _IOW(SNAPSHOT_IOC_MAGIC, 17, int) 27*53ee8cc1Swenshuai.xi #define SNAPSHOT_PREF_IMAGE_SIZE _IO(SNAPSHOT_IOC_MAGIC, 18) 28*53ee8cc1Swenshuai.xi #define SNAPSHOT_AVAIL_SWAP_SIZE _IOR(SNAPSHOT_IOC_MAGIC, 19, loff_t) 29*53ee8cc1Swenshuai.xi #define SNAPSHOT_ALLOC_SWAP_PAGE _IOR(SNAPSHOT_IOC_MAGIC, 20, loff_t) 30*53ee8cc1Swenshuai.xi #define SNAPSHOT_IOC_MAXNR 20 31*53ee8cc1Swenshuai.xi 32*53ee8cc1Swenshuai.xi #endif /* _LINUX_SUSPEND_IOCTLS_H */ 33