1/**************************************************************************** 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 { 23 __kernel_loff_t offset; 24 __u32 dev; 25} __attribute__((packed)); 26#define SNAPSHOT_IOC_MAGIC '3' 27#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) 31#define SNAPSHOT_FREE_SWAP_PAGES _IO(SNAPSHOT_IOC_MAGIC, 9) 32#define SNAPSHOT_S2RAM _IO(SNAPSHOT_IOC_MAGIC, 11) 33#define SNAPSHOT_SET_SWAP_AREA _IOW(SNAPSHOT_IOC_MAGIC, 13, struct resume_swap_area) 34#define SNAPSHOT_GET_IMAGE_SIZE _IOR(SNAPSHOT_IOC_MAGIC, 14, __kernel_loff_t) 35#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) 39#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 43