]> git.ipfire.org Git - thirdparty/util-linux.git/blob - mount/h/loop.h
Imported from util-linux-2.7.1 tarball.
[thirdparty/util-linux.git] / mount / h / loop.h
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 Public License.
8 */
9
10 #define LO_NAME_SIZE 64
11 #define LO_KEY_SIZE 32
12
13 struct loop_info {
14 int lo_number; /* ioctl r/o */
15 dev_t lo_device; /* ioctl r/o */
16 unsigned long lo_inode; /* ioctl r/o */
17 dev_t lo_rdevice; /* ioctl r/o */
18 int lo_offset;
19 int lo_encrypt_type;
20 int lo_encrypt_key_size; /* ioctl w/o */
21 int lo_flags; /* ioctl r/o */
22 char lo_name[LO_NAME_SIZE];
23 unsigned char lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */
24 unsigned long lo_init[2];
25 char reserved[4];
26 };
27
28 /*
29 * Loop encryption types --- LO_CRYPT_IDEA isn't supported yet
30 */
31
32 #define LO_CRYPT_NONE 0
33 #define LO_CRYPT_XOR 1
34 #define LO_CRYPT_DES 2
35 #define LO_CRYPT_IDEA 3
36 #define MAX_LO_CRYPT 4
37
38 /*
39 * IOCTL commands --- we will commandeer 0x4C ('L')
40 */
41
42 #define LOOP_SET_FD 0x4C00
43 #define LOOP_CLR_FD 0x4C01
44 #define LOOP_SET_STATUS 0x4C02
45 #define LOOP_GET_STATUS 0x4C03