From 7eb9e2cdee147dc840eda4b26a1585005fd6d536 Mon Sep 17 00:00:00 2001 From: Federico Maria Morrone Date: Tue, 19 Mar 2024 01:53:22 +0100 Subject: [PATCH] Add loop.h api (#113) --- Cargo.toml | 3 +- gen/modules/loop_device.h | 1 + src/aarch64/loop_device.rs | 133 ++++++++++++++++++++++++++++ src/arm/loop_device.rs | 131 ++++++++++++++++++++++++++++ src/csky/loop_device.rs | 131 ++++++++++++++++++++++++++++ src/lib.rs | 72 ++++++++++++++++ src/loongarch64/loop_device.rs | 133 ++++++++++++++++++++++++++++ src/mips/loop_device.rs | 141 ++++++++++++++++++++++++++++++ src/mips32r6/loop_device.rs | 141 ++++++++++++++++++++++++++++++ src/mips64/loop_device.rs | 143 ++++++++++++++++++++++++++++++ src/mips64r6/loop_device.rs | 143 ++++++++++++++++++++++++++++++ src/powerpc/loop_device.rs | 137 +++++++++++++++++++++++++++++ src/powerpc64/loop_device.rs | 139 ++++++++++++++++++++++++++++++ src/riscv32/loop_device.rs | 131 ++++++++++++++++++++++++++++ src/riscv64/loop_device.rs | 133 ++++++++++++++++++++++++++++ src/s390x/loop_device.rs | 153 +++++++++++++++++++++++++++++++++ src/sparc/loop_device.rs | 131 ++++++++++++++++++++++++++++ src/sparc64/loop_device.rs | 139 ++++++++++++++++++++++++++++++ src/x32/loop_device.rs | 133 ++++++++++++++++++++++++++++ src/x86/loop_device.rs | 131 ++++++++++++++++++++++++++++ src/x86_64/loop_device.rs | 133 ++++++++++++++++++++++++++++ 21 files changed, 2531 insertions(+), 1 deletion(-) create mode 100644 gen/modules/loop_device.h create mode 100644 src/aarch64/loop_device.rs create mode 100644 src/arm/loop_device.rs create mode 100644 src/csky/loop_device.rs create mode 100644 src/loongarch64/loop_device.rs create mode 100644 src/mips/loop_device.rs create mode 100644 src/mips32r6/loop_device.rs create mode 100644 src/mips64/loop_device.rs create mode 100644 src/mips64r6/loop_device.rs create mode 100644 src/powerpc/loop_device.rs create mode 100644 src/powerpc64/loop_device.rs create mode 100644 src/riscv32/loop_device.rs create mode 100644 src/riscv64/loop_device.rs create mode 100644 src/s390x/loop_device.rs create mode 100644 src/sparc/loop_device.rs create mode 100644 src/sparc64/loop_device.rs create mode 100644 src/x32/loop_device.rs create mode 100644 src/x86/loop_device.rs create mode 100644 src/x86_64/loop_device.rs diff --git a/Cargo.toml b/Cargo.toml index 3f8079a1..f1f0bdba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ static_assertions = "1.1.0" libc = "0.2.100" [package.metadata.docs.rs] -features = ["default", "ioctl", "netlink", "io_uring", "if_arp", "if_ether", "if_packet", "net", "prctl", "elf", "xdp", "mempolicy", "system"] +features = ["default", "ioctl", "netlink", "io_uring", "if_arp", "if_ether", "if_packet", "net", "prctl", "elf", "xdp", "mempolicy", "system", "loop_device"] targets = ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu"] # The rest of this file is auto-generated! @@ -33,6 +33,7 @@ if_ether = [] if_packet = [] io_uring = [] ioctl = [] +loop_device = [] mempolicy = [] net = [] netlink = [] diff --git a/gen/modules/loop_device.h b/gen/modules/loop_device.h new file mode 100644 index 00000000..9e693367 --- /dev/null +++ b/gen/modules/loop_device.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/src/aarch64/loop_device.rs b/src/aarch64/loop_device.rs new file mode 100644 index 00000000..48722ce5 --- /dev/null +++ b/src/aarch64/loop_device.rs @@ -0,0 +1,133 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_old_uid_t = crate::ctypes::c_ushort; +pub type __kernel_old_gid_t = crate::ctypes::c_ushort; +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = crate::ctypes::c_int; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_dev_t = crate::ctypes::c_uint; +pub type __kernel_size_t = __kernel_ulong_t; +pub type __kernel_ssize_t = __kernel_long_t; +pub type __kernel_ptrdiff_t = __kernel_long_t; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __s128 = i128; +pub type __u128 = u128; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/arm/loop_device.rs b/src/arm/loop_device.rs new file mode 100644 index 00000000..73290b66 --- /dev/null +++ b/src/arm/loop_device.rs @@ -0,0 +1,131 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_mode_t = crate::ctypes::c_ushort; +pub type __kernel_ipc_pid_t = crate::ctypes::c_ushort; +pub type __kernel_uid_t = crate::ctypes::c_ushort; +pub type __kernel_gid_t = crate::ctypes::c_ushort; +pub type __kernel_old_dev_t = crate::ctypes::c_ushort; +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = crate::ctypes::c_int; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_size_t = crate::ctypes::c_uint; +pub type __kernel_ssize_t = crate::ctypes::c_int; +pub type __kernel_ptrdiff_t = crate::ctypes::c_int; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/csky/loop_device.rs b/src/csky/loop_device.rs new file mode 100644 index 00000000..43657515 --- /dev/null +++ b/src/csky/loop_device.rs @@ -0,0 +1,131 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = crate::ctypes::c_int; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_old_dev_t = crate::ctypes::c_uint; +pub type __kernel_size_t = crate::ctypes::c_uint; +pub type __kernel_ssize_t = crate::ctypes::c_int; +pub type __kernel_ptrdiff_t = crate::ctypes::c_int; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/lib.rs b/src/lib.rs index 4edfaf35..3789e33d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -235,6 +235,10 @@ pub mod io_uring; #[cfg(target_arch = "arm")] #[path = "arm/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "arm")] +#[path = "arm/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "arm")] #[path = "arm/mempolicy.rs"] @@ -287,6 +291,10 @@ pub mod io_uring; #[cfg(target_arch = "aarch64")] #[path = "aarch64/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "aarch64")] +#[path = "aarch64/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "aarch64")] #[path = "aarch64/mempolicy.rs"] @@ -339,6 +347,10 @@ pub mod io_uring; #[cfg(target_arch = "csky")] #[path = "csky/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "csky")] +#[path = "csky/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "csky")] #[path = "csky/mempolicy.rs"] @@ -391,6 +403,10 @@ pub mod io_uring; #[cfg(target_arch = "loongarch64")] #[path = "loongarch64/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "loongarch64")] +#[path = "loongarch64/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "loongarch64")] #[path = "loongarch64/mempolicy.rs"] @@ -443,6 +459,10 @@ pub mod io_uring; #[cfg(target_arch = "mips")] #[path = "mips/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "mips")] +#[path = "mips/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "mips")] #[path = "mips/mempolicy.rs"] @@ -495,6 +515,10 @@ pub mod io_uring; #[cfg(target_arch = "mips64")] #[path = "mips64/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "mips64")] +#[path = "mips64/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "mips64")] #[path = "mips64/mempolicy.rs"] @@ -547,6 +571,10 @@ pub mod io_uring; #[cfg(target_arch = "mips32r6")] #[path = "mips32r6/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "mips32r6")] +#[path = "mips32r6/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "mips32r6")] #[path = "mips32r6/mempolicy.rs"] @@ -599,6 +627,10 @@ pub mod io_uring; #[cfg(target_arch = "mips64r6")] #[path = "mips64r6/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "mips64r6")] +#[path = "mips64r6/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "mips64r6")] #[path = "mips64r6/mempolicy.rs"] @@ -651,6 +683,10 @@ pub mod io_uring; #[cfg(target_arch = "powerpc")] #[path = "powerpc/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "powerpc")] +#[path = "powerpc/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "powerpc")] #[path = "powerpc/mempolicy.rs"] @@ -703,6 +739,10 @@ pub mod io_uring; #[cfg(target_arch = "powerpc64")] #[path = "powerpc64/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "powerpc64")] +#[path = "powerpc64/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "powerpc64")] #[path = "powerpc64/mempolicy.rs"] @@ -755,6 +795,10 @@ pub mod io_uring; #[cfg(target_arch = "riscv32")] #[path = "riscv32/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "riscv32")] +#[path = "riscv32/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "riscv32")] #[path = "riscv32/mempolicy.rs"] @@ -807,6 +851,10 @@ pub mod io_uring; #[cfg(target_arch = "riscv64")] #[path = "riscv64/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "riscv64")] +#[path = "riscv64/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "riscv64")] #[path = "riscv64/mempolicy.rs"] @@ -859,6 +907,10 @@ pub mod io_uring; #[cfg(target_arch = "s390x")] #[path = "s390x/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "s390x")] +#[path = "s390x/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "s390x")] #[path = "s390x/mempolicy.rs"] @@ -911,6 +963,10 @@ pub mod io_uring; #[cfg(target_arch = "sparc")] #[path = "sparc/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "sparc")] +#[path = "sparc/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "sparc")] #[path = "sparc/mempolicy.rs"] @@ -963,6 +1019,10 @@ pub mod io_uring; #[cfg(target_arch = "sparc64")] #[path = "sparc64/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "sparc64")] +#[path = "sparc64/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "sparc64")] #[path = "sparc64/mempolicy.rs"] @@ -1015,6 +1075,10 @@ pub mod io_uring; #[cfg(target_arch = "x86")] #[path = "x86/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(target_arch = "x86")] +#[path = "x86/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(target_arch = "x86")] #[path = "x86/mempolicy.rs"] @@ -1067,6 +1131,10 @@ pub mod io_uring; #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] #[path = "x86_64/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] +#[path = "x86_64/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] #[path = "x86_64/mempolicy.rs"] @@ -1119,6 +1187,10 @@ pub mod io_uring; #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] #[path = "x32/ioctl.rs"] pub mod ioctl; +#[cfg(feature = "loop_device")] +#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] +#[path = "x32/loop_device.rs"] +pub mod loop_device; #[cfg(feature = "mempolicy")] #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] #[path = "x32/mempolicy.rs"] diff --git a/src/loongarch64/loop_device.rs b/src/loongarch64/loop_device.rs new file mode 100644 index 00000000..84215a56 --- /dev/null +++ b/src/loongarch64/loop_device.rs @@ -0,0 +1,133 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = crate::ctypes::c_int; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_old_dev_t = crate::ctypes::c_uint; +pub type __kernel_size_t = __kernel_ulong_t; +pub type __kernel_ssize_t = __kernel_long_t; +pub type __kernel_ptrdiff_t = __kernel_long_t; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __s128 = i128; +pub type __u128 = u128; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/mips/loop_device.rs b/src/mips/loop_device.rs new file mode 100644 index 00000000..3487b19d --- /dev/null +++ b/src/mips/loop_device.rs @@ -0,0 +1,141 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_daddr_t = crate::ctypes::c_long; +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_old_dev_t = crate::ctypes::c_uint; +pub type __kernel_size_t = crate::ctypes::c_uint; +pub type __kernel_ssize_t = crate::ctypes::c_int; +pub type __kernel_ptrdiff_t = crate::ctypes::c_int; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const _MIPS_ISA_MIPS1: u32 = 1; +pub const _MIPS_ISA_MIPS2: u32 = 2; +pub const _MIPS_ISA_MIPS3: u32 = 3; +pub const _MIPS_ISA_MIPS4: u32 = 4; +pub const _MIPS_ISA_MIPS5: u32 = 5; +pub const _MIPS_ISA_MIPS32: u32 = 6; +pub const _MIPS_ISA_MIPS64: u32 = 7; +pub const _MIPS_SIM_ABI32: u32 = 1; +pub const _MIPS_SIM_NABI32: u32 = 2; +pub const _MIPS_SIM_ABI64: u32 = 3; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/mips32r6/loop_device.rs b/src/mips32r6/loop_device.rs new file mode 100644 index 00000000..3487b19d --- /dev/null +++ b/src/mips32r6/loop_device.rs @@ -0,0 +1,141 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_daddr_t = crate::ctypes::c_long; +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_old_dev_t = crate::ctypes::c_uint; +pub type __kernel_size_t = crate::ctypes::c_uint; +pub type __kernel_ssize_t = crate::ctypes::c_int; +pub type __kernel_ptrdiff_t = crate::ctypes::c_int; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const _MIPS_ISA_MIPS1: u32 = 1; +pub const _MIPS_ISA_MIPS2: u32 = 2; +pub const _MIPS_ISA_MIPS3: u32 = 3; +pub const _MIPS_ISA_MIPS4: u32 = 4; +pub const _MIPS_ISA_MIPS5: u32 = 5; +pub const _MIPS_ISA_MIPS32: u32 = 6; +pub const _MIPS_ISA_MIPS64: u32 = 7; +pub const _MIPS_SIM_ABI32: u32 = 1; +pub const _MIPS_SIM_NABI32: u32 = 2; +pub const _MIPS_SIM_ABI64: u32 = 3; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/mips64/loop_device.rs b/src/mips64/loop_device.rs new file mode 100644 index 00000000..5afa91ea --- /dev/null +++ b/src/mips64/loop_device.rs @@ -0,0 +1,143 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_daddr_t = crate::ctypes::c_long; +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_old_dev_t = crate::ctypes::c_uint; +pub type __kernel_size_t = __kernel_ulong_t; +pub type __kernel_ssize_t = __kernel_long_t; +pub type __kernel_ptrdiff_t = __kernel_long_t; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_long; +pub type __u64 = crate::ctypes::c_ulong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __s128 = i128; +pub type __u128 = u128; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const _MIPS_ISA_MIPS1: u32 = 1; +pub const _MIPS_ISA_MIPS2: u32 = 2; +pub const _MIPS_ISA_MIPS3: u32 = 3; +pub const _MIPS_ISA_MIPS4: u32 = 4; +pub const _MIPS_ISA_MIPS5: u32 = 5; +pub const _MIPS_ISA_MIPS32: u32 = 6; +pub const _MIPS_ISA_MIPS64: u32 = 7; +pub const _MIPS_SIM_ABI32: u32 = 1; +pub const _MIPS_SIM_NABI32: u32 = 2; +pub const _MIPS_SIM_ABI64: u32 = 3; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/mips64r6/loop_device.rs b/src/mips64r6/loop_device.rs new file mode 100644 index 00000000..5afa91ea --- /dev/null +++ b/src/mips64r6/loop_device.rs @@ -0,0 +1,143 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_daddr_t = crate::ctypes::c_long; +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_old_dev_t = crate::ctypes::c_uint; +pub type __kernel_size_t = __kernel_ulong_t; +pub type __kernel_ssize_t = __kernel_long_t; +pub type __kernel_ptrdiff_t = __kernel_long_t; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_long; +pub type __u64 = crate::ctypes::c_ulong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __s128 = i128; +pub type __u128 = u128; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const _MIPS_ISA_MIPS1: u32 = 1; +pub const _MIPS_ISA_MIPS2: u32 = 2; +pub const _MIPS_ISA_MIPS3: u32 = 3; +pub const _MIPS_ISA_MIPS4: u32 = 4; +pub const _MIPS_ISA_MIPS5: u32 = 5; +pub const _MIPS_ISA_MIPS32: u32 = 6; +pub const _MIPS_ISA_MIPS64: u32 = 7; +pub const _MIPS_SIM_ABI32: u32 = 1; +pub const _MIPS_SIM_NABI32: u32 = 2; +pub const _MIPS_SIM_ABI64: u32 = 3; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/powerpc/loop_device.rs b/src/powerpc/loop_device.rs new file mode 100644 index 00000000..ddccec9d --- /dev/null +++ b/src/powerpc/loop_device.rs @@ -0,0 +1,137 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_ipc_pid_t = crate::ctypes::c_short; +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = crate::ctypes::c_int; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_old_dev_t = crate::ctypes::c_uint; +pub type __kernel_size_t = crate::ctypes::c_uint; +pub type __kernel_ssize_t = crate::ctypes::c_int; +pub type __kernel_ptrdiff_t = crate::ctypes::c_int; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[repr(align(16))] +#[derive(Debug, Copy, Clone)] +pub struct __vector128 { +pub u: [__u32; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/powerpc64/loop_device.rs b/src/powerpc64/loop_device.rs new file mode 100644 index 00000000..ee933b0e --- /dev/null +++ b/src/powerpc64/loop_device.rs @@ -0,0 +1,139 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_old_dev_t = crate::ctypes::c_ulong; +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = crate::ctypes::c_int; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_size_t = __kernel_ulong_t; +pub type __kernel_ssize_t = __kernel_long_t; +pub type __kernel_ptrdiff_t = __kernel_long_t; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_long; +pub type __u64 = crate::ctypes::c_ulong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __s128 = i128; +pub type __u128 = u128; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[repr(align(16))] +#[derive(Debug, Copy, Clone)] +pub struct __vector128 { +pub u: [__u32; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/riscv32/loop_device.rs b/src/riscv32/loop_device.rs new file mode 100644 index 00000000..43657515 --- /dev/null +++ b/src/riscv32/loop_device.rs @@ -0,0 +1,131 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = crate::ctypes::c_int; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_old_dev_t = crate::ctypes::c_uint; +pub type __kernel_size_t = crate::ctypes::c_uint; +pub type __kernel_ssize_t = crate::ctypes::c_int; +pub type __kernel_ptrdiff_t = crate::ctypes::c_int; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/riscv64/loop_device.rs b/src/riscv64/loop_device.rs new file mode 100644 index 00000000..84215a56 --- /dev/null +++ b/src/riscv64/loop_device.rs @@ -0,0 +1,133 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = crate::ctypes::c_int; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_old_dev_t = crate::ctypes::c_uint; +pub type __kernel_size_t = __kernel_ulong_t; +pub type __kernel_ssize_t = __kernel_long_t; +pub type __kernel_ptrdiff_t = __kernel_long_t; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __s128 = i128; +pub type __u128 = u128; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/s390x/loop_device.rs b/src/s390x/loop_device.rs new file mode 100644 index 00000000..a1e23b94 --- /dev/null +++ b/src/s390x/loop_device.rs @@ -0,0 +1,153 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_size_t = crate::ctypes::c_ulong; +pub type __kernel_ssize_t = crate::ctypes::c_long; +pub type __kernel_old_dev_t = crate::ctypes::c_ushort; +pub type __kernel_ino_t = crate::ctypes::c_uint; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_ptrdiff_t = crate::ctypes::c_long; +pub type __kernel_sigset_t = crate::ctypes::c_ulong; +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = crate::ctypes::c_int; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type addr_t = crate::ctypes::c_ulong; +pub type saddr_t = crate::ctypes::c_long; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __s128 = i128; +pub type __u128 = u128; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C, packed(4))] +#[derive(Copy, Clone)] +pub struct __vector128 { +pub __bindgen_anon_1: __vector128__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __vector128__bindgen_ty_1__bindgen_ty_1 { +pub high: __u64, +pub low: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __vector128__bindgen_ty_1 { +pub __bindgen_anon_1: __vector128__bindgen_ty_1__bindgen_ty_1, +pub u: [__u32; 4usize], +} diff --git a/src/sparc/loop_device.rs b/src/sparc/loop_device.rs new file mode 100644 index 00000000..5da99990 --- /dev/null +++ b/src/sparc/loop_device.rs @@ -0,0 +1,131 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_size_t = crate::ctypes::c_uint; +pub type __kernel_ssize_t = crate::ctypes::c_int; +pub type __kernel_ptrdiff_t = crate::ctypes::c_long; +pub type __kernel_ipc_pid_t = crate::ctypes::c_ushort; +pub type __kernel_uid_t = crate::ctypes::c_ushort; +pub type __kernel_gid_t = crate::ctypes::c_ushort; +pub type __kernel_mode_t = crate::ctypes::c_ushort; +pub type __kernel_daddr_t = crate::ctypes::c_long; +pub type __kernel_old_dev_t = crate::ctypes::c_ushort; +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/sparc64/loop_device.rs b/src/sparc64/loop_device.rs new file mode 100644 index 00000000..ad0c9648 --- /dev/null +++ b/src/sparc64/loop_device.rs @@ -0,0 +1,139 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_old_uid_t = crate::ctypes::c_ushort; +pub type __kernel_old_gid_t = crate::ctypes::c_ushort; +pub type __kernel_suseconds_t = crate::ctypes::c_int; +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_daddr_t = crate::ctypes::c_int; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_dev_t = crate::ctypes::c_uint; +pub type __kernel_size_t = __kernel_ulong_t; +pub type __kernel_ssize_t = __kernel_long_t; +pub type __kernel_ptrdiff_t = __kernel_long_t; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __s128 = i128; +pub type __u128 = u128; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __kernel_old_timeval { +pub tv_sec: __kernel_long_t, +pub tv_usec: __kernel_suseconds_t, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/x32/loop_device.rs b/src/x32/loop_device.rs new file mode 100644 index 00000000..054e598f --- /dev/null +++ b/src/x32/loop_device.rs @@ -0,0 +1,133 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_long_t = crate::ctypes::c_longlong; +pub type __kernel_ulong_t = crate::ctypes::c_ulonglong; +pub type __kernel_old_uid_t = crate::ctypes::c_ushort; +pub type __kernel_old_gid_t = crate::ctypes::c_ushort; +pub type __kernel_old_dev_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = crate::ctypes::c_int; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_size_t = crate::ctypes::c_uint; +pub type __kernel_ssize_t = crate::ctypes::c_int; +pub type __kernel_ptrdiff_t = crate::ctypes::c_int; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __s128 = i128; +pub type __u128 = u128; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/x86/loop_device.rs b/src/x86/loop_device.rs new file mode 100644 index 00000000..73290b66 --- /dev/null +++ b/src/x86/loop_device.rs @@ -0,0 +1,131 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_mode_t = crate::ctypes::c_ushort; +pub type __kernel_ipc_pid_t = crate::ctypes::c_ushort; +pub type __kernel_uid_t = crate::ctypes::c_ushort; +pub type __kernel_gid_t = crate::ctypes::c_ushort; +pub type __kernel_old_dev_t = crate::ctypes::c_ushort; +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = crate::ctypes::c_int; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_size_t = crate::ctypes::c_uint; +pub type __kernel_ssize_t = crate::ctypes::c_int; +pub type __kernel_ptrdiff_t = crate::ctypes::c_int; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +} diff --git a/src/x86_64/loop_device.rs b/src/x86_64/loop_device.rs new file mode 100644 index 00000000..100a6167 --- /dev/null +++ b/src/x86_64/loop_device.rs @@ -0,0 +1,133 @@ +/* automatically generated by rust-bindgen 0.66.1 */ + +pub type __kernel_old_uid_t = crate::ctypes::c_ushort; +pub type __kernel_old_gid_t = crate::ctypes::c_ushort; +pub type __kernel_old_dev_t = crate::ctypes::c_ulong; +pub type __kernel_long_t = crate::ctypes::c_long; +pub type __kernel_ulong_t = crate::ctypes::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = crate::ctypes::c_uint; +pub type __kernel_pid_t = crate::ctypes::c_int; +pub type __kernel_ipc_pid_t = crate::ctypes::c_int; +pub type __kernel_uid_t = crate::ctypes::c_uint; +pub type __kernel_gid_t = crate::ctypes::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = crate::ctypes::c_int; +pub type __kernel_uid32_t = crate::ctypes::c_uint; +pub type __kernel_gid32_t = crate::ctypes::c_uint; +pub type __kernel_size_t = __kernel_ulong_t; +pub type __kernel_ssize_t = __kernel_long_t; +pub type __kernel_ptrdiff_t = __kernel_long_t; +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = crate::ctypes::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = crate::ctypes::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = crate::ctypes::c_int; +pub type __kernel_clockid_t = crate::ctypes::c_int; +pub type __kernel_caddr_t = *mut crate::ctypes::c_char; +pub type __kernel_uid16_t = crate::ctypes::c_ushort; +pub type __kernel_gid16_t = crate::ctypes::c_ushort; +pub type __s8 = crate::ctypes::c_schar; +pub type __u8 = crate::ctypes::c_uchar; +pub type __s16 = crate::ctypes::c_short; +pub type __u16 = crate::ctypes::c_ushort; +pub type __s32 = crate::ctypes::c_int; +pub type __u32 = crate::ctypes::c_uint; +pub type __s64 = crate::ctypes::c_longlong; +pub type __u64 = crate::ctypes::c_ulonglong; +pub type __kernel_key_t = crate::ctypes::c_int; +pub type __kernel_mqd_t = crate::ctypes::c_int; +pub type __s128 = i128; +pub type __u128 = u128; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = crate::ctypes::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info { +pub lo_number: crate::ctypes::c_int, +pub lo_device: __kernel_old_dev_t, +pub lo_inode: crate::ctypes::c_ulong, +pub lo_rdevice: __kernel_old_dev_t, +pub lo_offset: crate::ctypes::c_int, +pub lo_encrypt_type: crate::ctypes::c_int, +pub lo_encrypt_key_size: crate::ctypes::c_int, +pub lo_flags: crate::ctypes::c_int, +pub lo_name: [crate::ctypes::c_char; 64usize], +pub lo_encrypt_key: [crate::ctypes::c_uchar; 32usize], +pub lo_init: [crate::ctypes::c_ulong; 2usize], +pub reserved: [crate::ctypes::c_char; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_info64 { +pub lo_device: __u64, +pub lo_inode: __u64, +pub lo_rdevice: __u64, +pub lo_offset: __u64, +pub lo_sizelimit: __u64, +pub lo_number: __u32, +pub lo_encrypt_type: __u32, +pub lo_encrypt_key_size: __u32, +pub lo_flags: __u32, +pub lo_file_name: [__u8; 64usize], +pub lo_crypt_name: [__u8; 64usize], +pub lo_encrypt_key: [__u8; 32usize], +pub lo_init: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct loop_config { +pub fd: __u32, +pub block_size: __u32, +pub info: loop_info64, +pub __reserved: [__u64; 8usize], +} +pub const LO_NAME_SIZE: u32 = 64; +pub const LO_KEY_SIZE: u32 = 32; +pub const LO_CRYPT_NONE: u32 = 0; +pub const LO_CRYPT_XOR: u32 = 1; +pub const LO_CRYPT_DES: u32 = 2; +pub const LO_CRYPT_FISH2: u32 = 3; +pub const LO_CRYPT_BLOW: u32 = 4; +pub const LO_CRYPT_CAST128: u32 = 5; +pub const LO_CRYPT_IDEA: u32 = 6; +pub const LO_CRYPT_DUMMY: u32 = 9; +pub const LO_CRYPT_SKIPJACK: u32 = 10; +pub const LO_CRYPT_CRYPTOAPI: u32 = 18; +pub const MAX_LO_CRYPT: u32 = 20; +pub const LOOP_SET_FD: u32 = 19456; +pub const LOOP_CLR_FD: u32 = 19457; +pub const LOOP_SET_STATUS: u32 = 19458; +pub const LOOP_GET_STATUS: u32 = 19459; +pub const LOOP_SET_STATUS64: u32 = 19460; +pub const LOOP_GET_STATUS64: u32 = 19461; +pub const LOOP_CHANGE_FD: u32 = 19462; +pub const LOOP_SET_CAPACITY: u32 = 19463; +pub const LOOP_SET_DIRECT_IO: u32 = 19464; +pub const LOOP_SET_BLOCK_SIZE: u32 = 19465; +pub const LOOP_CONFIGURE: u32 = 19466; +pub const LOOP_CTL_ADD: u32 = 19584; +pub const LOOP_CTL_REMOVE: u32 = 19585; +pub const LOOP_CTL_GET_FREE: u32 = 19586; +pub const LO_FLAGS_READ_ONLY: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_READ_ONLY; +pub const LO_FLAGS_AUTOCLEAR: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_AUTOCLEAR; +pub const LO_FLAGS_PARTSCAN: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_PARTSCAN; +pub const LO_FLAGS_DIRECT_IO: _bindgen_ty_1 = _bindgen_ty_1::LO_FLAGS_DIRECT_IO; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_1 { +LO_FLAGS_READ_ONLY = 1, +LO_FLAGS_AUTOCLEAR = 4, +LO_FLAGS_PARTSCAN = 8, +LO_FLAGS_DIRECT_IO = 16, +}