Home | History | Annotate | Download | only in linux
      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  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef _LINUX_LOOP_H
     13 #define _LINUX_LOOP_H
     14 
     15 #define LO_NAME_SIZE 64
     16 #define LO_KEY_SIZE 32
     17 
     18 enum {
     19  LO_FLAGS_READ_ONLY = 1,
     20  LO_FLAGS_USE_AOPS = 2,
     21 };
     22 
     23 #include <asm/posix_types.h>
     24 #include <asm/types.h>
     25 
     26 struct loop_info {
     27  int lo_number;
     28  __kernel_old_dev_t lo_device;
     29  unsigned long lo_inode;
     30  __kernel_old_dev_t lo_rdevice;
     31  int lo_offset;
     32  int lo_encrypt_type;
     33  int lo_encrypt_key_size;
     34  int lo_flags;
     35  char lo_name[LO_NAME_SIZE];
     36  unsigned char lo_encrypt_key[LO_KEY_SIZE];
     37  unsigned long lo_init[2];
     38  char reserved[4];
     39 };
     40 
     41 struct loop_info64 {
     42  __u64 lo_device;
     43  __u64 lo_inode;
     44  __u64 lo_rdevice;
     45  __u64 lo_offset;
     46  __u64 lo_sizelimit;
     47  __u32 lo_number;
     48  __u32 lo_encrypt_type;
     49  __u32 lo_encrypt_key_size;
     50  __u32 lo_flags;
     51  __u8 lo_file_name[LO_NAME_SIZE];
     52  __u8 lo_crypt_name[LO_NAME_SIZE];
     53  __u8 lo_encrypt_key[LO_KEY_SIZE];
     54  __u64 lo_init[2];
     55 };
     56 
     57 #define LO_CRYPT_NONE 0
     58 #define LO_CRYPT_XOR 1
     59 #define LO_CRYPT_DES 2
     60 #define LO_CRYPT_FISH2 3
     61 #define LO_CRYPT_BLOW 4
     62 #define LO_CRYPT_CAST128 5
     63 #define LO_CRYPT_IDEA 6
     64 #define LO_CRYPT_DUMMY 9
     65 #define LO_CRYPT_SKIPJACK 10
     66 #define LO_CRYPT_CRYPTOAPI 18
     67 #define MAX_LO_CRYPT 20
     68 
     69 #define LOOP_SET_FD 0x4C00
     70 #define LOOP_CLR_FD 0x4C01
     71 #define LOOP_SET_STATUS 0x4C02
     72 #define LOOP_GET_STATUS 0x4C03
     73 #define LOOP_SET_STATUS64 0x4C04
     74 #define LOOP_GET_STATUS64 0x4C05
     75 #define LOOP_CHANGE_FD 0x4C06
     76 
     77 #endif
     78