diff options
| author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
|---|---|---|
| committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-10-19 15:19:19 -0400 |
| commit | e05dacd71db0a5da7c1a44bcaab2a8a240b9c233 (patch) | |
| tree | 31382cf1c7d62c03126448affb2fc86e8c4aaa8b /include/uapi/linux/loop.h | |
| parent | 3ab0b83bf6a1e834f4b884150d8012990c75d25d (diff) | |
| parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) | |
Merge commit 'v3.7-rc1' into stable/for-linus-3.7
* commit 'v3.7-rc1': (10892 commits)
Linux 3.7-rc1
x86, boot: Explicitly include autoconf.h for hostprogs
perf: Fix UAPI fallout
ARM: config: make sure that platforms are ordered by option string
ARM: config: sort select statements alphanumerically
UAPI: (Scripted) Disintegrate include/linux/byteorder
UAPI: (Scripted) Disintegrate include/linux
UAPI: Unexport linux/blk_types.h
UAPI: Unexport part of linux/ppp-comp.h
perf: Handle new rbtree implementation
procfs: don't need a PATH_MAX allocation to hold a string representation of an int
vfs: embed struct filename inside of names_cache allocation if possible
audit: make audit_inode take struct filename
vfs: make path_openat take a struct filename pointer
vfs: turn do_path_lookup into wrapper around struct filename variant
audit: allow audit code to satisfy getname requests from its names_list
vfs: define struct filename and have getname() return it
btrfs: Fix compilation with user namespace support enabled
userns: Fix posix_acl_file_xattr_userns gid conversion
userns: Properly print bluetooth socket uids
...
Diffstat (limited to 'include/uapi/linux/loop.h')
| -rw-r--r-- | include/uapi/linux/loop.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/include/uapi/linux/loop.h b/include/uapi/linux/loop.h new file mode 100644 index 000000000000..e0cecd2eabdc --- /dev/null +++ b/include/uapi/linux/loop.h | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/loop.h | ||
| 3 | * | ||
| 4 | * Written by Theodore Ts'o, 3/29/93. | ||
| 5 | * | ||
| 6 | * Copyright 1993 by Theodore Ts'o. Redistribution of this file is | ||
| 7 | * permitted under the GNU General Public License. | ||
| 8 | */ | ||
| 9 | #ifndef _UAPI_LINUX_LOOP_H | ||
| 10 | #define _UAPI_LINUX_LOOP_H | ||
| 11 | |||
| 12 | |||
| 13 | #define LO_NAME_SIZE 64 | ||
| 14 | #define LO_KEY_SIZE 32 | ||
| 15 | |||
| 16 | |||
| 17 | /* | ||
| 18 | * Loop flags | ||
| 19 | */ | ||
| 20 | enum { | ||
| 21 | LO_FLAGS_READ_ONLY = 1, | ||
| 22 | LO_FLAGS_AUTOCLEAR = 4, | ||
| 23 | LO_FLAGS_PARTSCAN = 8, | ||
| 24 | }; | ||
| 25 | |||
| 26 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ | ||
| 27 | #include <linux/types.h> /* for __u64 */ | ||
| 28 | |||
| 29 | /* Backwards compatibility version */ | ||
| 30 | struct loop_info { | ||
| 31 | int lo_number; /* ioctl r/o */ | ||
| 32 | __kernel_old_dev_t lo_device; /* ioctl r/o */ | ||
| 33 | unsigned long lo_inode; /* ioctl r/o */ | ||
| 34 | __kernel_old_dev_t lo_rdevice; /* ioctl r/o */ | ||
| 35 | int lo_offset; | ||
| 36 | int lo_encrypt_type; | ||
| 37 | int lo_encrypt_key_size; /* ioctl w/o */ | ||
| 38 | int lo_flags; /* ioctl r/o */ | ||
| 39 | char lo_name[LO_NAME_SIZE]; | ||
| 40 | unsigned char lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */ | ||
| 41 | unsigned long lo_init[2]; | ||
| 42 | char reserved[4]; | ||
| 43 | }; | ||
| 44 | |||
| 45 | struct loop_info64 { | ||
| 46 | __u64 lo_device; /* ioctl r/o */ | ||
| 47 | __u64 lo_inode; /* ioctl r/o */ | ||
| 48 | __u64 lo_rdevice; /* ioctl r/o */ | ||
| 49 | __u64 lo_offset; | ||
| 50 | __u64 lo_sizelimit;/* bytes, 0 == max available */ | ||
| 51 | __u32 lo_number; /* ioctl r/o */ | ||
| 52 | __u32 lo_encrypt_type; | ||
| 53 | __u32 lo_encrypt_key_size; /* ioctl w/o */ | ||
| 54 | __u32 lo_flags; /* ioctl r/o */ | ||
| 55 | __u8 lo_file_name[LO_NAME_SIZE]; | ||
| 56 | __u8 lo_crypt_name[LO_NAME_SIZE]; | ||
| 57 | __u8 lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */ | ||
| 58 | __u64 lo_init[2]; | ||
| 59 | }; | ||
| 60 | |||
| 61 | /* | ||
| 62 | * Loop filter types | ||
| 63 | */ | ||
| 64 | |||
| 65 | #define LO_CRYPT_NONE 0 | ||
| 66 | #define LO_CRYPT_XOR 1 | ||
| 67 | #define LO_CRYPT_DES 2 | ||
| 68 | #define LO_CRYPT_FISH2 3 /* Twofish encryption */ | ||
| 69 | #define LO_CRYPT_BLOW 4 | ||
| 70 | #define LO_CRYPT_CAST128 5 | ||
| 71 | #define LO_CRYPT_IDEA 6 | ||
| 72 | #define LO_CRYPT_DUMMY 9 | ||
| 73 | #define LO_CRYPT_SKIPJACK 10 | ||
| 74 | #define LO_CRYPT_CRYPTOAPI 18 | ||
| 75 | #define MAX_LO_CRYPT 20 | ||
| 76 | |||
| 77 | /* | ||
| 78 | * IOCTL commands --- we will commandeer 0x4C ('L') | ||
| 79 | */ | ||
| 80 | |||
| 81 | #define LOOP_SET_FD 0x4C00 | ||
| 82 | #define LOOP_CLR_FD 0x4C01 | ||
| 83 | #define LOOP_SET_STATUS 0x4C02 | ||
| 84 | #define LOOP_GET_STATUS 0x4C03 | ||
| 85 | #define LOOP_SET_STATUS64 0x4C04 | ||
| 86 | #define LOOP_GET_STATUS64 0x4C05 | ||
| 87 | #define LOOP_CHANGE_FD 0x4C06 | ||
| 88 | #define LOOP_SET_CAPACITY 0x4C07 | ||
| 89 | |||
| 90 | /* /dev/loop-control interface */ | ||
| 91 | #define LOOP_CTL_ADD 0x4C80 | ||
| 92 | #define LOOP_CTL_REMOVE 0x4C81 | ||
| 93 | #define LOOP_CTL_GET_FREE 0x4C82 | ||
| 94 | #endif /* _UAPI_LINUX_LOOP_H */ | ||
