linux_raw_sys/x86/
loop_device.rs

1/* automatically generated by rust-bindgen 0.72.1 */
2
3pub type __kernel_mode_t = crate::ctypes::c_ushort;
4pub type __kernel_ipc_pid_t = crate::ctypes::c_ushort;
5pub type __kernel_uid_t = crate::ctypes::c_ushort;
6pub type __kernel_gid_t = crate::ctypes::c_ushort;
7pub type __kernel_old_dev_t = crate::ctypes::c_ushort;
8pub type __kernel_long_t = crate::ctypes::c_long;
9pub type __kernel_ulong_t = crate::ctypes::c_ulong;
10pub type __kernel_ino_t = __kernel_ulong_t;
11pub type __kernel_pid_t = crate::ctypes::c_int;
12pub type __kernel_suseconds_t = __kernel_long_t;
13pub type __kernel_daddr_t = crate::ctypes::c_int;
14pub type __kernel_uid32_t = crate::ctypes::c_uint;
15pub type __kernel_gid32_t = crate::ctypes::c_uint;
16pub type __kernel_old_uid_t = __kernel_uid_t;
17pub type __kernel_old_gid_t = __kernel_gid_t;
18pub type __kernel_size_t = crate::ctypes::c_uint;
19pub type __kernel_ssize_t = crate::ctypes::c_int;
20pub type __kernel_ptrdiff_t = crate::ctypes::c_int;
21pub type __kernel_off_t = __kernel_long_t;
22pub type __kernel_loff_t = crate::ctypes::c_longlong;
23pub type __kernel_old_time_t = __kernel_long_t;
24pub type __kernel_time_t = __kernel_long_t;
25pub type __kernel_time64_t = crate::ctypes::c_longlong;
26pub type __kernel_clock_t = __kernel_long_t;
27pub type __kernel_timer_t = crate::ctypes::c_int;
28pub type __kernel_clockid_t = crate::ctypes::c_int;
29pub type __kernel_caddr_t = *mut crate::ctypes::c_char;
30pub type __kernel_uid16_t = crate::ctypes::c_ushort;
31pub type __kernel_gid16_t = crate::ctypes::c_ushort;
32pub type __s8 = crate::ctypes::c_schar;
33pub type __u8 = crate::ctypes::c_uchar;
34pub type __s16 = crate::ctypes::c_short;
35pub type __u16 = crate::ctypes::c_ushort;
36pub type __s32 = crate::ctypes::c_int;
37pub type __u32 = crate::ctypes::c_uint;
38pub type __s64 = crate::ctypes::c_longlong;
39pub type __u64 = crate::ctypes::c_ulonglong;
40pub type __kernel_key_t = crate::ctypes::c_int;
41pub type __kernel_mqd_t = crate::ctypes::c_int;
42pub type __le16 = __u16;
43pub type __be16 = __u16;
44pub type __le32 = __u32;
45pub type __be32 = __u32;
46pub type __le64 = __u64;
47pub type __be64 = __u64;
48pub type __sum16 = __u16;
49pub type __wsum = __u32;
50pub type __poll_t = crate::ctypes::c_uint;
51#[repr(C)]
52#[derive(Debug, Copy, Clone)]
53pub struct loop_info {
54pub lo_number: crate::ctypes::c_int,
55pub lo_device: __kernel_old_dev_t,
56pub lo_inode: crate::ctypes::c_ulong,
57pub lo_rdevice: __kernel_old_dev_t,
58pub lo_offset: crate::ctypes::c_int,
59pub lo_encrypt_type: crate::ctypes::c_int,
60pub lo_encrypt_key_size: crate::ctypes::c_int,
61pub lo_flags: crate::ctypes::c_int,
62pub lo_name: [crate::ctypes::c_char; 64usize],
63pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize],
64pub lo_init: [crate::ctypes::c_ulong; 2usize],
65pub reserved: [crate::ctypes::c_char; 4usize],
66}
67#[repr(C)]
68#[derive(Debug, Copy, Clone)]
69pub struct loop_info64 {
70pub lo_device: __u64,
71pub lo_inode: __u64,
72pub lo_rdevice: __u64,
73pub lo_offset: __u64,
74pub lo_sizelimit: __u64,
75pub lo_number: __u32,
76pub lo_encrypt_type: __u32,
77pub lo_encrypt_key_size: __u32,
78pub lo_flags: __u32,
79pub lo_file_name: [__u8; 64usize],
80pub lo_crypt_name: [__u8; 64usize],
81pub lo_encrypt_key: [__u8; 32usize],
82pub lo_init: [__u64; 2usize],
83}
84#[repr(C)]
85#[derive(Debug, Copy, Clone)]
86pub struct loop_config {
87pub fd: __u32,
88pub block_size: __u32,
89pub info: loop_info64,
90pub __reserved: [__u64; 8usize],
91}
92pub const LO_NAME_SIZE: u32 = 64;
93pub const LO_KEY_SIZE: u32 = 32;
94pub const __BITS_PER_LONG_LONG: u32 = 64;
95pub const LO_CRYPT_NONE: u32 = 0;
96pub const LO_CRYPT_XOR: u32 = 1;
97pub const LO_CRYPT_DES: u32 = 2;
98pub const LO_CRYPT_FISH2: u32 = 3;
99pub const LO_CRYPT_BLOW: u32 = 4;
100pub const LO_CRYPT_CAST128: u32 = 5;
101pub const LO_CRYPT_IDEA: u32 = 6;
102pub const LO_CRYPT_DUMMY: u32 = 9;
103pub const LO_CRYPT_SKIPJACK: u32 = 10;
104pub const LO_CRYPT_CRYPTOAPI: u32 = 18;
105pub const MAX_LO_CRYPT: u32 = 20;
106pub const LOOP_SET_FD: u32 = 19456;
107pub const LOOP_CLR_FD: u32 = 19457;
108pub const LOOP_SET_STATUS: u32 = 19458;
109pub const LOOP_GET_STATUS: u32 = 19459;
110pub const LOOP_SET_STATUS64: u32 = 19460;
111pub const LOOP_GET_STATUS64: u32 = 19461;
112pub const LOOP_CHANGE_FD: u32 = 19462;
113pub const LOOP_SET_CAPACITY: u32 = 19463;
114pub const LOOP_SET_DIRECT_IO: u32 = 19464;
115pub const LOOP_SET_BLOCK_SIZE: u32 = 19465;
116pub const LOOP_CONFIGURE: u32 = 19466;
117pub const LOOP_CTL_ADD: u32 = 19584;
118pub const LOOP_CTL_REMOVE: u32 = 19585;
119pub const LOOP_CTL_GET_FREE: u32 = 19586;
120pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY;
121pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR;
122pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN;
123pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO;
124#[repr(u32)]
125#[non_exhaustive]
126#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
127pub enum _bindgen_ty_1 {
128LO_FLAGS_READ_ONLY = 1,
129LO_FLAGS_AUTOCLEAR = 4,
130LO_FLAGS_PARTSCAN = 8,
131LO_FLAGS_DIRECT_IO = 16,
132}