1*cda5da8dSAndroid Build Coastguard Worker /* 2*cda5da8dSAndroid Build Coastguard Worker * This file is auto-generated. Modifications will be lost. 3*cda5da8dSAndroid Build Coastguard Worker * 4*cda5da8dSAndroid Build Coastguard Worker * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5*cda5da8dSAndroid Build Coastguard Worker * for more information. 6*cda5da8dSAndroid Build Coastguard Worker */ 7*cda5da8dSAndroid Build Coastguard Worker #ifndef _UAPI_LINUX_LOOP_H 8*cda5da8dSAndroid Build Coastguard Worker #define _UAPI_LINUX_LOOP_H 9*cda5da8dSAndroid Build Coastguard Worker #define LO_NAME_SIZE 64 10*cda5da8dSAndroid Build Coastguard Worker #define LO_KEY_SIZE 32 11*cda5da8dSAndroid Build Coastguard Worker enum { 12*cda5da8dSAndroid Build Coastguard Worker LO_FLAGS_READ_ONLY = 1, 13*cda5da8dSAndroid Build Coastguard Worker LO_FLAGS_AUTOCLEAR = 4, 14*cda5da8dSAndroid Build Coastguard Worker LO_FLAGS_PARTSCAN = 8, 15*cda5da8dSAndroid Build Coastguard Worker LO_FLAGS_DIRECT_IO = 16, 16*cda5da8dSAndroid Build Coastguard Worker }; 17*cda5da8dSAndroid Build Coastguard Worker #define LOOP_SET_STATUS_SETTABLE_FLAGS (LO_FLAGS_AUTOCLEAR | LO_FLAGS_PARTSCAN) 18*cda5da8dSAndroid Build Coastguard Worker #define LOOP_SET_STATUS_CLEARABLE_FLAGS (LO_FLAGS_AUTOCLEAR) 19*cda5da8dSAndroid Build Coastguard Worker #define LOOP_CONFIGURE_SETTABLE_FLAGS (LO_FLAGS_READ_ONLY | LO_FLAGS_AUTOCLEAR | LO_FLAGS_PARTSCAN | LO_FLAGS_DIRECT_IO) 20*cda5da8dSAndroid Build Coastguard Worker #include <asm/posix_types.h> 21*cda5da8dSAndroid Build Coastguard Worker #include <linux/types.h> 22*cda5da8dSAndroid Build Coastguard Worker struct loop_info { 23*cda5da8dSAndroid Build Coastguard Worker int lo_number; 24*cda5da8dSAndroid Build Coastguard Worker __kernel_old_dev_t lo_device; 25*cda5da8dSAndroid Build Coastguard Worker unsigned long lo_inode; 26*cda5da8dSAndroid Build Coastguard Worker __kernel_old_dev_t lo_rdevice; 27*cda5da8dSAndroid Build Coastguard Worker int lo_offset; 28*cda5da8dSAndroid Build Coastguard Worker int lo_encrypt_type; 29*cda5da8dSAndroid Build Coastguard Worker int lo_encrypt_key_size; 30*cda5da8dSAndroid Build Coastguard Worker int lo_flags; 31*cda5da8dSAndroid Build Coastguard Worker char lo_name[LO_NAME_SIZE]; 32*cda5da8dSAndroid Build Coastguard Worker unsigned char lo_encrypt_key[LO_KEY_SIZE]; 33*cda5da8dSAndroid Build Coastguard Worker unsigned long lo_init[2]; 34*cda5da8dSAndroid Build Coastguard Worker char reserved[4]; 35*cda5da8dSAndroid Build Coastguard Worker }; 36*cda5da8dSAndroid Build Coastguard Worker struct loop_info64 { 37*cda5da8dSAndroid Build Coastguard Worker __u64 lo_device; 38*cda5da8dSAndroid Build Coastguard Worker __u64 lo_inode; 39*cda5da8dSAndroid Build Coastguard Worker __u64 lo_rdevice; 40*cda5da8dSAndroid Build Coastguard Worker __u64 lo_offset; 41*cda5da8dSAndroid Build Coastguard Worker __u64 lo_sizelimit; 42*cda5da8dSAndroid Build Coastguard Worker __u32 lo_number; 43*cda5da8dSAndroid Build Coastguard Worker __u32 lo_encrypt_type; 44*cda5da8dSAndroid Build Coastguard Worker __u32 lo_encrypt_key_size; 45*cda5da8dSAndroid Build Coastguard Worker __u32 lo_flags; 46*cda5da8dSAndroid Build Coastguard Worker __u8 lo_file_name[LO_NAME_SIZE]; 47*cda5da8dSAndroid Build Coastguard Worker __u8 lo_crypt_name[LO_NAME_SIZE]; 48*cda5da8dSAndroid Build Coastguard Worker __u8 lo_encrypt_key[LO_KEY_SIZE]; 49*cda5da8dSAndroid Build Coastguard Worker __u64 lo_init[2]; 50*cda5da8dSAndroid Build Coastguard Worker }; 51*cda5da8dSAndroid Build Coastguard Worker struct loop_config { 52*cda5da8dSAndroid Build Coastguard Worker __u32 fd; 53*cda5da8dSAndroid Build Coastguard Worker __u32 block_size; 54*cda5da8dSAndroid Build Coastguard Worker struct loop_info64 info; 55*cda5da8dSAndroid Build Coastguard Worker __u64 __reserved[8]; 56*cda5da8dSAndroid Build Coastguard Worker }; 57*cda5da8dSAndroid Build Coastguard Worker #define LO_CRYPT_NONE 0 58*cda5da8dSAndroid Build Coastguard Worker #define LO_CRYPT_XOR 1 59*cda5da8dSAndroid Build Coastguard Worker #define LO_CRYPT_DES 2 60*cda5da8dSAndroid Build Coastguard Worker #define LO_CRYPT_FISH2 3 61*cda5da8dSAndroid Build Coastguard Worker #define LO_CRYPT_BLOW 4 62*cda5da8dSAndroid Build Coastguard Worker #define LO_CRYPT_CAST128 5 63*cda5da8dSAndroid Build Coastguard Worker #define LO_CRYPT_IDEA 6 64*cda5da8dSAndroid Build Coastguard Worker #define LO_CRYPT_DUMMY 9 65*cda5da8dSAndroid Build Coastguard Worker #define LO_CRYPT_SKIPJACK 10 66*cda5da8dSAndroid Build Coastguard Worker #define LO_CRYPT_CRYPTOAPI 18 67*cda5da8dSAndroid Build Coastguard Worker #define MAX_LO_CRYPT 20 68*cda5da8dSAndroid Build Coastguard Worker #define LOOP_SET_FD 0x4C00 69*cda5da8dSAndroid Build Coastguard Worker #define LOOP_CLR_FD 0x4C01 70*cda5da8dSAndroid Build Coastguard Worker #define LOOP_SET_STATUS 0x4C02 71*cda5da8dSAndroid Build Coastguard Worker #define LOOP_GET_STATUS 0x4C03 72*cda5da8dSAndroid Build Coastguard Worker #define LOOP_SET_STATUS64 0x4C04 73*cda5da8dSAndroid Build Coastguard Worker #define LOOP_GET_STATUS64 0x4C05 74*cda5da8dSAndroid Build Coastguard Worker #define LOOP_CHANGE_FD 0x4C06 75*cda5da8dSAndroid Build Coastguard Worker #define LOOP_SET_CAPACITY 0x4C07 76*cda5da8dSAndroid Build Coastguard Worker #define LOOP_SET_DIRECT_IO 0x4C08 77*cda5da8dSAndroid Build Coastguard Worker #define LOOP_SET_BLOCK_SIZE 0x4C09 78*cda5da8dSAndroid Build Coastguard Worker #define LOOP_CONFIGURE 0x4C0A 79*cda5da8dSAndroid Build Coastguard Worker #define LOOP_CTL_ADD 0x4C80 80*cda5da8dSAndroid Build Coastguard Worker #define LOOP_CTL_REMOVE 0x4C81 81*cda5da8dSAndroid Build Coastguard Worker #define LOOP_CTL_GET_FREE 0x4C82 82*cda5da8dSAndroid Build Coastguard Worker #endif 83