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 _UAPI_LINUX_LOOP_H 20#define _UAPI_LINUX_LOOP_H 21#define LO_NAME_SIZE 64 22#define LO_KEY_SIZE 32 23enum { 24 LO_FLAGS_READ_ONLY = 1, 25 LO_FLAGS_AUTOCLEAR = 4, 26 LO_FLAGS_PARTSCAN = 8, 27 LO_FLAGS_DIRECT_IO = 16, 28}; 29#include <asm/posix_types.h> 30#include <linux/types.h> 31struct loop_info { 32 int lo_number; 33 __kernel_old_dev_t lo_device; 34 unsigned long lo_inode; 35 __kernel_old_dev_t lo_rdevice; 36 int lo_offset; 37 int lo_encrypt_type; 38 int lo_encrypt_key_size; 39 int lo_flags; 40 char lo_name[LO_NAME_SIZE]; 41 unsigned char lo_encrypt_key[LO_KEY_SIZE]; 42 unsigned long lo_init[2]; 43 char reserved[4]; 44}; 45struct loop_info64 { 46 __u64 lo_device; 47 __u64 lo_inode; 48 __u64 lo_rdevice; 49 __u64 lo_offset; 50 __u64 lo_sizelimit; 51 __u32 lo_number; 52 __u32 lo_encrypt_type; 53 __u32 lo_encrypt_key_size; 54 __u32 lo_flags; 55 __u8 lo_file_name[LO_NAME_SIZE]; 56 __u8 lo_crypt_name[LO_NAME_SIZE]; 57 __u8 lo_encrypt_key[LO_KEY_SIZE]; 58 __u64 lo_init[2]; 59}; 60#define LO_CRYPT_NONE 0 61#define LO_CRYPT_XOR 1 62#define LO_CRYPT_DES 2 63#define LO_CRYPT_FISH2 3 64#define LO_CRYPT_BLOW 4 65#define LO_CRYPT_CAST128 5 66#define LO_CRYPT_IDEA 6 67#define LO_CRYPT_DUMMY 9 68#define LO_CRYPT_SKIPJACK 10 69#define LO_CRYPT_CRYPTOAPI 18 70#define MAX_LO_CRYPT 20 71#define LOOP_SET_FD 0x4C00 72#define LOOP_CLR_FD 0x4C01 73#define LOOP_SET_STATUS 0x4C02 74#define LOOP_GET_STATUS 0x4C03 75#define LOOP_SET_STATUS64 0x4C04 76#define LOOP_GET_STATUS64 0x4C05 77#define LOOP_CHANGE_FD 0x4C06 78#define LOOP_SET_CAPACITY 0x4C07 79#define LOOP_SET_DIRECT_IO 0x4C08 80#define LOOP_SET_BLOCK_SIZE 0x4C09 81#define LOOP_CTL_ADD 0x4C80 82#define LOOP_CTL_REMOVE 0x4C81 83#define LOOP_CTL_GET_FREE 0x4C82 84#endif 85