mdconfig/
ffi64.rs

1#![allow(non_camel_case_types)]
2#![allow(non_upper_case_globals)]
3#![allow(unused)]
4/* automatically generated by rust-bindgen 0.69.4 */
5
6pub const MDNPAD: u32 = 96;
7pub const MDIOVERSION: u32 = 0;
8pub const MD_CLUSTER: u32 = 1;
9pub const MD_RESERVE: u32 = 2;
10pub const MD_AUTOUNIT: u32 = 4;
11pub const MD_READONLY: u32 = 8;
12pub const MD_COMPRESS: u32 = 16;
13pub const MD_FORCE: u32 = 32;
14pub const MD_ASYNC: u32 = 64;
15pub const MD_VERIFY: u32 = 128;
16pub const MD_CACHE: u32 = 256;
17pub const MD_MUSTDEALLOC: u32 = 512;
18pub type __int64_t = ::std::os::raw::c_long;
19pub type __uint64_t = ::std::os::raw::c_ulong;
20pub type __off_t = __int64_t;
21pub type u_int64_t = __uint64_t;
22pub type off_t = __off_t;
23pub const md_types_MD_MALLOC: md_types = 0;
24pub const md_types_MD_PRELOAD: md_types = 1;
25pub const md_types_MD_VNODE: md_types = 2;
26pub const md_types_MD_SWAP: md_types = 3;
27pub const md_types_MD_NULL: md_types = 4;
28pub type md_types = ::std::os::raw::c_uint;
29#[repr(C)]
30#[derive(Debug, Copy, Clone)]
31pub struct md_ioctl {
32    pub md_version:    ::std::os::raw::c_uint,
33    pub md_unit:       ::std::os::raw::c_uint,
34    pub md_type:       md_types,
35    pub md_file:       *mut ::std::os::raw::c_char,
36    pub md_mediasize:  off_t,
37    pub md_sectorsize: ::std::os::raw::c_uint,
38    pub md_options:    ::std::os::raw::c_uint,
39    pub md_base:       u_int64_t,
40    pub md_fwheads:    ::std::os::raw::c_int,
41    pub md_fwsectors:  ::std::os::raw::c_int,
42    pub md_label:      *mut ::std::os::raw::c_char,
43    pub md_pad:        [::std::os::raw::c_int; 96usize],
44}
45#[test]
46fn bindgen_test_layout_md_ioctl() {
47    const UNINIT: ::std::mem::MaybeUninit<md_ioctl> =
48        ::std::mem::MaybeUninit::uninit();
49    let ptr = UNINIT.as_ptr();
50    assert_eq!(
51        ::std::mem::size_of::<md_ioctl>(),
52        448usize,
53        concat!("Size of: ", stringify!(md_ioctl))
54    );
55    assert_eq!(
56        ::std::mem::align_of::<md_ioctl>(),
57        8usize,
58        concat!("Alignment of ", stringify!(md_ioctl))
59    );
60    assert_eq!(
61        unsafe {
62            ::std::ptr::addr_of!((*ptr).md_version) as usize - ptr as usize
63        },
64        0usize,
65        concat!(
66            "Offset of field: ",
67            stringify!(md_ioctl),
68            "::",
69            stringify!(md_version)
70        )
71    );
72    assert_eq!(
73        unsafe { ::std::ptr::addr_of!((*ptr).md_unit) as usize - ptr as usize },
74        4usize,
75        concat!(
76            "Offset of field: ",
77            stringify!(md_ioctl),
78            "::",
79            stringify!(md_unit)
80        )
81    );
82    assert_eq!(
83        unsafe { ::std::ptr::addr_of!((*ptr).md_type) as usize - ptr as usize },
84        8usize,
85        concat!(
86            "Offset of field: ",
87            stringify!(md_ioctl),
88            "::",
89            stringify!(md_type)
90        )
91    );
92    assert_eq!(
93        unsafe { ::std::ptr::addr_of!((*ptr).md_file) as usize - ptr as usize },
94        16usize,
95        concat!(
96            "Offset of field: ",
97            stringify!(md_ioctl),
98            "::",
99            stringify!(md_file)
100        )
101    );
102    assert_eq!(
103        unsafe {
104            ::std::ptr::addr_of!((*ptr).md_mediasize) as usize - ptr as usize
105        },
106        24usize,
107        concat!(
108            "Offset of field: ",
109            stringify!(md_ioctl),
110            "::",
111            stringify!(md_mediasize)
112        )
113    );
114    assert_eq!(
115        unsafe {
116            ::std::ptr::addr_of!((*ptr).md_sectorsize) as usize - ptr as usize
117        },
118        32usize,
119        concat!(
120            "Offset of field: ",
121            stringify!(md_ioctl),
122            "::",
123            stringify!(md_sectorsize)
124        )
125    );
126    assert_eq!(
127        unsafe {
128            ::std::ptr::addr_of!((*ptr).md_options) as usize - ptr as usize
129        },
130        36usize,
131        concat!(
132            "Offset of field: ",
133            stringify!(md_ioctl),
134            "::",
135            stringify!(md_options)
136        )
137    );
138    assert_eq!(
139        unsafe { ::std::ptr::addr_of!((*ptr).md_base) as usize - ptr as usize },
140        40usize,
141        concat!(
142            "Offset of field: ",
143            stringify!(md_ioctl),
144            "::",
145            stringify!(md_base)
146        )
147    );
148    assert_eq!(
149        unsafe {
150            ::std::ptr::addr_of!((*ptr).md_fwheads) as usize - ptr as usize
151        },
152        48usize,
153        concat!(
154            "Offset of field: ",
155            stringify!(md_ioctl),
156            "::",
157            stringify!(md_fwheads)
158        )
159    );
160    assert_eq!(
161        unsafe {
162            ::std::ptr::addr_of!((*ptr).md_fwsectors) as usize - ptr as usize
163        },
164        52usize,
165        concat!(
166            "Offset of field: ",
167            stringify!(md_ioctl),
168            "::",
169            stringify!(md_fwsectors)
170        )
171    );
172    assert_eq!(
173        unsafe {
174            ::std::ptr::addr_of!((*ptr).md_label) as usize - ptr as usize
175        },
176        56usize,
177        concat!(
178            "Offset of field: ",
179            stringify!(md_ioctl),
180            "::",
181            stringify!(md_label)
182        )
183    );
184    assert_eq!(
185        unsafe { ::std::ptr::addr_of!((*ptr).md_pad) as usize - ptr as usize },
186        64usize,
187        concat!(
188            "Offset of field: ",
189            stringify!(md_ioctl),
190            "::",
191            stringify!(md_pad)
192        )
193    );
194}