1#[repr(C)]
4#[derive(Default)]
5pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
6impl<T> __IncompleteArrayField<T> {
7 #[inline]
8 pub const fn new() -> Self {
9 __IncompleteArrayField(::std::marker::PhantomData, [])
10 }
11 #[inline]
12 pub fn as_ptr(&self) -> *const T {
13 self as *const _ as *const T
14 }
15 #[inline]
16 pub fn as_mut_ptr(&mut self) -> *mut T {
17 self as *mut _ as *mut T
18 }
19 #[inline]
20 pub unsafe fn as_slice(&self, len: usize) -> &[T] {
21 ::std::slice::from_raw_parts(self.as_ptr(), len)
22 }
23 #[inline]
24 pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
25 ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
26 }
27}
28impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
29 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30 fmt.write_str("__IncompleteArrayField")
31 }
32}
33pub const F_SET_EXT2: u32 = 2;
34pub const F_SET_EXT3: u32 = 3;
35pub const F_SET_EXT4: u32 = 4;
36pub const CONFIG_EXT_FEATURE_SET_LVL: u32 = 4;
37pub const CONFIG_JOURNALING_ENABLE: u32 = 1;
38pub const CONFIG_XATTR_ENABLE: u32 = 1;
39pub const CONFIG_EXTENTS_ENABLE: u32 = 1;
40pub const CONFIG_HAVE_OWN_ERRNO: u32 = 0;
41pub const CONFIG_DEBUG_PRINTF: u32 = 1;
42pub const CONFIG_DEBUG_ASSERT: u32 = 1;
43pub const CONFIG_HAVE_OWN_ASSERT: u32 = 1;
44pub const CONFIG_BLOCK_DEV_ENABLE_STATS: u32 = 1;
45pub const CONFIG_BLOCK_DEV_CACHE_SIZE: u32 = 128;
46pub const CONFIG_EXT4_MAX_BLOCKDEV_NAME: u32 = 32;
47pub const CONFIG_EXT4_BLOCKDEVS_COUNT: u32 = 2;
48pub const CONFIG_EXT4_MAX_MP_NAME: u32 = 32;
49pub const CONFIG_EXT4_MOUNTPOINTS_COUNT: u32 = 2;
50pub const CONFIG_HAVE_OWN_OFLAGS: u32 = 1;
51pub const CONFIG_MAX_TRUNCATE_SIZE: u32 = 16777216;
52pub const CONFIG_UNALIGNED_ACCESS: u32 = 0;
53pub const CONFIG_USE_USER_MALLOC: u32 = 0;
54pub const __bool_true_false_are_defined: u32 = 1;
55pub const true_: u32 = 1;
56pub const false_: u32 = 0;
57pub const SPLAY_NEGINF: i32 = -1;
58pub const SPLAY_INF: u32 = 1;
59pub const RB_BLACK: u32 = 0;
60pub const RB_RED: u32 = 1;
61pub const RB_NEGINF: i32 = -1;
62pub const RB_INF: u32 = 1;
63pub const EXT4_CHECKSUM_CRC32C: u32 = 1;
64pub const UUID_SIZE: u32 = 16;
65pub const EXT4_SUPERBLOCK_MAGIC: u32 = 61267;
66pub const EXT4_SUPERBLOCK_SIZE: u32 = 1024;
67pub const EXT4_SUPERBLOCK_OFFSET: u32 = 1024;
68pub const EXT4_SUPERBLOCK_OS_LINUX: u32 = 0;
69pub const EXT4_SUPERBLOCK_OS_HURD: u32 = 1;
70pub const EXT4_SUPERBLOCK_FLAGS_SIGNED_HASH: u32 = 1;
71pub const EXT4_SUPERBLOCK_FLAGS_UNSIGNED_HASH: u32 = 2;
72pub const EXT4_SUPERBLOCK_FLAGS_TEST_FILESYS: u32 = 4;
73pub const EXT4_SUPERBLOCK_STATE_VALID_FS: u32 = 1;
74pub const EXT4_SUPERBLOCK_STATE_ERROR_FS: u32 = 2;
75pub const EXT4_SUPERBLOCK_STATE_ORPHAN_FS: u32 = 4;
76pub const EXT4_SUPERBLOCK_ERRORS_CONTINUE: u32 = 1;
77pub const EXT4_SUPERBLOCK_ERRORS_RO: u32 = 2;
78pub const EXT4_SUPERBLOCK_ERRORS_PANIC: u32 = 3;
79pub const EXT4_FCOM_DIR_PREALLOC: u32 = 1;
80pub const EXT4_FCOM_IMAGIC_INODES: u32 = 2;
81pub const EXT4_FCOM_HAS_JOURNAL: u32 = 4;
82pub const EXT4_FCOM_EXT_ATTR: u32 = 8;
83pub const EXT4_FCOM_RESIZE_INODE: u32 = 16;
84pub const EXT4_FCOM_DIR_INDEX: u32 = 32;
85pub const EXT4_FRO_COM_SPARSE_SUPER: u32 = 1;
86pub const EXT4_FRO_COM_LARGE_FILE: u32 = 2;
87pub const EXT4_FRO_COM_BTREE_DIR: u32 = 4;
88pub const EXT4_FRO_COM_HUGE_FILE: u32 = 8;
89pub const EXT4_FRO_COM_GDT_CSUM: u32 = 16;
90pub const EXT4_FRO_COM_DIR_NLINK: u32 = 32;
91pub const EXT4_FRO_COM_EXTRA_ISIZE: u32 = 64;
92pub const EXT4_FRO_COM_QUOTA: u32 = 256;
93pub const EXT4_FRO_COM_BIGALLOC: u32 = 512;
94pub const EXT4_FRO_COM_METADATA_CSUM: u32 = 1024;
95pub const EXT4_FINCOM_COMPRESSION: u32 = 1;
96pub const EXT4_FINCOM_FILETYPE: u32 = 2;
97pub const EXT4_FINCOM_RECOVER: u32 = 4;
98pub const EXT4_FINCOM_JOURNAL_DEV: u32 = 8;
99pub const EXT4_FINCOM_META_BG: u32 = 16;
100pub const EXT4_FINCOM_EXTENTS: u32 = 64;
101pub const EXT4_FINCOM_64BIT: u32 = 128;
102pub const EXT4_FINCOM_MMP: u32 = 256;
103pub const EXT4_FINCOM_FLEX_BG: u32 = 512;
104pub const EXT4_FINCOM_EA_INODE: u32 = 1024;
105pub const EXT4_FINCOM_DIRDATA: u32 = 4096;
106pub const EXT4_FINCOM_BG_USE_META_CSUM: u32 = 8192;
107pub const EXT4_FINCOM_LARGEDIR: u32 = 16384;
108pub const EXT4_FINCOM_INLINE_DATA: u32 = 32768;
109pub const EXT2_SUPPORTED_FCOM: u32 = 0;
110pub const EXT2_SUPPORTED_FINCOM: u32 = 18;
111pub const EXT2_SUPPORTED_FRO_COM: u32 = 3;
112pub const EXT3_SUPPORTED_FCOM: u32 = 32;
113pub const EXT3_SUPPORTED_FINCOM: u32 = 18;
114pub const EXT3_SUPPORTED_FRO_COM: u32 = 3;
115pub const EXT4_SUPPORTED_FCOM: u32 = 32;
116pub const EXT4_SUPPORTED_FINCOM: u32 = 722;
117pub const EXT4_SUPPORTED_FRO_COM: u32 = 1147;
118pub const EXT_FINCOM_IGNORED: u32 = 260;
119pub const EXT4_BLOCK_GROUP_INODE_UNINIT: u32 = 1;
120pub const EXT4_BLOCK_GROUP_BLOCK_UNINIT: u32 = 2;
121pub const EXT4_BLOCK_GROUP_ITABLE_ZEROED: u32 = 4;
122pub const EXT4_MIN_BLOCK_GROUP_DESCRIPTOR_SIZE: u32 = 32;
123pub const EXT4_MAX_BLOCK_GROUP_DESCRIPTOR_SIZE: u32 = 64;
124pub const EXT4_MIN_BLOCK_SIZE: u32 = 1024;
125pub const EXT4_MAX_BLOCK_SIZE: u32 = 65536;
126pub const EXT4_REV0_INODE_SIZE: u32 = 128;
127pub const EXT4_INODE_BLOCK_SIZE: u32 = 512;
128pub const EXT4_INODE_DIRECT_BLOCK_COUNT: u32 = 12;
129pub const EXT4_INODE_INDIRECT_BLOCK: u32 = 12;
130pub const EXT4_INODE_DOUBLE_INDIRECT_BLOCK: u32 = 13;
131pub const EXT4_INODE_TRIPPLE_INDIRECT_BLOCK: u32 = 14;
132pub const EXT4_INODE_BLOCKS: u32 = 15;
133pub const EXT4_INODE_INDIRECT_BLOCK_COUNT: u32 = 3;
134pub const EXT4_INODE_MODE_FIFO: u32 = 4096;
135pub const EXT4_INODE_MODE_CHARDEV: u32 = 8192;
136pub const EXT4_INODE_MODE_DIRECTORY: u32 = 16384;
137pub const EXT4_INODE_MODE_BLOCKDEV: u32 = 24576;
138pub const EXT4_INODE_MODE_FILE: u32 = 32768;
139pub const EXT4_INODE_MODE_SOFTLINK: u32 = 40960;
140pub const EXT4_INODE_MODE_SOCKET: u32 = 49152;
141pub const EXT4_INODE_MODE_TYPE_MASK: u32 = 61440;
142pub const EXT4_INODE_FLAG_SECRM: u32 = 1;
143pub const EXT4_INODE_FLAG_UNRM: u32 = 2;
144pub const EXT4_INODE_FLAG_COMPR: u32 = 4;
145pub const EXT4_INODE_FLAG_SYNC: u32 = 8;
146pub const EXT4_INODE_FLAG_IMMUTABLE: u32 = 16;
147pub const EXT4_INODE_FLAG_APPEND: u32 = 32;
148pub const EXT4_INODE_FLAG_NODUMP: u32 = 64;
149pub const EXT4_INODE_FLAG_NOATIME: u32 = 128;
150pub const EXT4_INODE_FLAG_DIRTY: u32 = 256;
151pub const EXT4_INODE_FLAG_COMPRBLK: u32 = 512;
152pub const EXT4_INODE_FLAG_NOCOMPR: u32 = 1024;
153pub const EXT4_INODE_FLAG_ECOMPR: u32 = 2048;
154pub const EXT4_INODE_FLAG_INDEX: u32 = 4096;
155pub const EXT4_INODE_FLAG_IMAGIC: u32 = 8192;
156pub const EXT4_INODE_FLAG_JOURNAL_DATA: u32 = 16384;
157pub const EXT4_INODE_FLAG_NOTAIL: u32 = 32768;
158pub const EXT4_INODE_FLAG_DIRSYNC: u32 = 65536;
159pub const EXT4_INODE_FLAG_TOPDIR: u32 = 131072;
160pub const EXT4_INODE_FLAG_HUGE_FILE: u32 = 262144;
161pub const EXT4_INODE_FLAG_EXTENTS: u32 = 524288;
162pub const EXT4_INODE_FLAG_EA_INODE: u32 = 2097152;
163pub const EXT4_INODE_FLAG_EOFBLOCKS: u32 = 4194304;
164pub const EXT4_INODE_FLAG_RESERVED: u32 = 2147483648;
165pub const EXT4_INODE_ROOT_INDEX: u32 = 2;
166pub const EXT4_DIRECTORY_FILENAME_LEN: u32 = 255;
167pub const EXT4_DIRENTRY_DIR_CSUM: u32 = 222;
168pub const EXT4_ERR_BAD_DX_DIR: i32 = -25000;
169pub const EXT4_LINK_MAX: u32 = 65000;
170pub const EXT4_BAD_INO: u32 = 1;
171pub const EXT4_ROOT_INO: u32 = 2;
172pub const EXT4_BOOT_LOADER_INO: u32 = 5;
173pub const EXT4_UNDEL_DIR_INO: u32 = 6;
174pub const EXT4_RESIZE_INO: u32 = 7;
175pub const EXT4_JOURNAL_INO: u32 = 8;
176pub const EXT4_GOOD_OLD_FIRST_INO: u32 = 11;
177pub const EXT2_HTREE_LEGACY: u32 = 0;
178pub const EXT2_HTREE_HALF_MD4: u32 = 1;
179pub const EXT2_HTREE_TEA: u32 = 2;
180pub const EXT2_HTREE_LEGACY_UNSIGNED: u32 = 3;
181pub const EXT2_HTREE_HALF_MD4_UNSIGNED: u32 = 4;
182pub const EXT2_HTREE_TEA_UNSIGNED: u32 = 5;
183pub const EXT2_HTREE_EOF: u32 = 2147483647;
184pub const EXT4_GOOD_OLD_INODE_SIZE: u32 = 128;
185pub const JBD_MAGIC_NUMBER: u32 = 3225106840;
186pub const JBD_DESCRIPTOR_BLOCK: u32 = 1;
187pub const JBD_COMMIT_BLOCK: u32 = 2;
188pub const JBD_SUPERBLOCK: u32 = 3;
189pub const JBD_SUPERBLOCK_V2: u32 = 4;
190pub const JBD_REVOKE_BLOCK: u32 = 5;
191pub const JBD_CRC32_CHKSUM: u32 = 1;
192pub const JBD_MD5_CHKSUM: u32 = 2;
193pub const JBD_SHA1_CHKSUM: u32 = 3;
194pub const JBD_CRC32C_CHKSUM: u32 = 4;
195pub const JBD_CRC32_CHKSUM_SIZE: u32 = 4;
196pub const JBD_FLAG_ESCAPE: u32 = 1;
197pub const JBD_FLAG_SAME_UUID: u32 = 2;
198pub const JBD_FLAG_DELETED: u32 = 4;
199pub const JBD_FLAG_LAST_TAG: u32 = 8;
200pub const JBD_USERS_MAX: u32 = 48;
201pub const JBD_USERS_SIZE: u32 = 768;
202pub const JBD_FEATURE_COMPAT_CHECKSUM: u32 = 1;
203pub const JBD_FEATURE_INCOMPAT_REVOKE: u32 = 1;
204pub const JBD_FEATURE_INCOMPAT_64BIT: u32 = 2;
205pub const JBD_FEATURE_INCOMPAT_ASYNC_COMMIT: u32 = 4;
206pub const JBD_FEATURE_INCOMPAT_CSUM_V2: u32 = 8;
207pub const JBD_FEATURE_INCOMPAT_CSUM_V3: u32 = 16;
208pub const JBD_KNOWN_COMPAT_FEATURES: u32 = 0;
209pub const JBD_KNOWN_ROCOMPAT_FEATURES: u32 = 0;
210pub const JBD_KNOWN_INCOMPAT_FEATURES: u32 = 31;
211pub const EXT4_CRC32_INIT: u32 = 4294967295;
212pub const EPERM: u32 = 1;
213pub const ENOENT: u32 = 2;
214pub const ESRCH: u32 = 3;
215pub const EINTR: u32 = 4;
216pub const EIO: u32 = 5;
217pub const ENXIO: u32 = 6;
218pub const E2BIG: u32 = 7;
219pub const ENOEXEC: u32 = 8;
220pub const EBADF: u32 = 9;
221pub const ECHILD: u32 = 10;
222pub const EAGAIN: u32 = 11;
223pub const ENOMEM: u32 = 12;
224pub const EACCES: u32 = 13;
225pub const EFAULT: u32 = 14;
226pub const ENOTBLK: u32 = 15;
227pub const EBUSY: u32 = 16;
228pub const EEXIST: u32 = 17;
229pub const EXDEV: u32 = 18;
230pub const ENODEV: u32 = 19;
231pub const ENOTDIR: u32 = 20;
232pub const EISDIR: u32 = 21;
233pub const EINVAL: u32 = 22;
234pub const ENFILE: u32 = 23;
235pub const EMFILE: u32 = 24;
236pub const ENOTTY: u32 = 25;
237pub const ETXTBSY: u32 = 26;
238pub const EFBIG: u32 = 27;
239pub const ENOSPC: u32 = 28;
240pub const ESPIPE: u32 = 29;
241pub const EROFS: u32 = 30;
242pub const EMLINK: u32 = 31;
243pub const EPIPE: u32 = 32;
244pub const EDOM: u32 = 33;
245pub const ERANGE: u32 = 34;
246pub const EDEADLK: u32 = 35;
247pub const ENAMETOOLONG: u32 = 36;
248pub const ENOLCK: u32 = 37;
249pub const ENOSYS: u32 = 38;
250pub const ENOTEMPTY: u32 = 39;
251pub const ELOOP: u32 = 40;
252pub const EWOULDBLOCK: u32 = 11;
253pub const ENOMSG: u32 = 42;
254pub const EIDRM: u32 = 43;
255pub const ECHRNG: u32 = 44;
256pub const EL2NSYNC: u32 = 45;
257pub const EL3HLT: u32 = 46;
258pub const EL3RST: u32 = 47;
259pub const ELNRNG: u32 = 48;
260pub const EUNATCH: u32 = 49;
261pub const ENOCSI: u32 = 50;
262pub const EL2HLT: u32 = 51;
263pub const EBADE: u32 = 52;
264pub const EBADR: u32 = 53;
265pub const EXFULL: u32 = 54;
266pub const ENOANO: u32 = 55;
267pub const EBADRQC: u32 = 56;
268pub const EBADSLT: u32 = 57;
269pub const EDEADLOCK: u32 = 35;
270pub const EBFONT: u32 = 59;
271pub const ENOSTR: u32 = 60;
272pub const ENODATA: u32 = 61;
273pub const ETIME: u32 = 62;
274pub const ENOSR: u32 = 63;
275pub const ENONET: u32 = 64;
276pub const ENOPKG: u32 = 65;
277pub const EREMOTE: u32 = 66;
278pub const ENOLINK: u32 = 67;
279pub const EADV: u32 = 68;
280pub const ESRMNT: u32 = 69;
281pub const ECOMM: u32 = 70;
282pub const EPROTO: u32 = 71;
283pub const EMULTIHOP: u32 = 72;
284pub const EDOTDOT: u32 = 73;
285pub const EBADMSG: u32 = 74;
286pub const EOVERFLOW: u32 = 75;
287pub const ENOTUNIQ: u32 = 76;
288pub const EBADFD: u32 = 77;
289pub const EREMCHG: u32 = 78;
290pub const ELIBACC: u32 = 79;
291pub const ELIBBAD: u32 = 80;
292pub const ELIBSCN: u32 = 81;
293pub const ELIBMAX: u32 = 82;
294pub const ELIBEXEC: u32 = 83;
295pub const EILSEQ: u32 = 84;
296pub const ERESTART: u32 = 85;
297pub const ESTRPIPE: u32 = 86;
298pub const EUSERS: u32 = 87;
299pub const ENOTSOCK: u32 = 88;
300pub const EDESTADDRREQ: u32 = 89;
301pub const EMSGSIZE: u32 = 90;
302pub const EPROTOTYPE: u32 = 91;
303pub const ENOPROTOOPT: u32 = 92;
304pub const EPROTONOSUPPORT: u32 = 93;
305pub const ESOCKTNOSUPPORT: u32 = 94;
306pub const EOPNOTSUPP: u32 = 95;
307pub const ENOTSUP: u32 = 95;
308pub const EPFNOSUPPORT: u32 = 96;
309pub const EAFNOSUPPORT: u32 = 97;
310pub const EADDRINUSE: u32 = 98;
311pub const EADDRNOTAVAIL: u32 = 99;
312pub const ENETDOWN: u32 = 100;
313pub const ENETUNREACH: u32 = 101;
314pub const ENETRESET: u32 = 102;
315pub const ECONNABORTED: u32 = 103;
316pub const ECONNRESET: u32 = 104;
317pub const ENOBUFS: u32 = 105;
318pub const EISCONN: u32 = 106;
319pub const ENOTCONN: u32 = 107;
320pub const ESHUTDOWN: u32 = 108;
321pub const ETOOMANYREFS: u32 = 109;
322pub const ETIMEDOUT: u32 = 110;
323pub const ECONNREFUSED: u32 = 111;
324pub const EHOSTDOWN: u32 = 112;
325pub const EHOSTUNREACH: u32 = 113;
326pub const EALREADY: u32 = 114;
327pub const EINPROGRESS: u32 = 115;
328pub const ESTALE: u32 = 116;
329pub const EUCLEAN: u32 = 117;
330pub const ENOTNAM: u32 = 118;
331pub const ENAVAIL: u32 = 119;
332pub const EISNAM: u32 = 120;
333pub const EREMOTEIO: u32 = 121;
334pub const EDQUOT: u32 = 122;
335pub const ENOMEDIUM: u32 = 123;
336pub const EMEDIUMTYPE: u32 = 124;
337pub const ECANCELED: u32 = 125;
338pub const ENOKEY: u32 = 126;
339pub const EKEYEXPIRED: u32 = 127;
340pub const EKEYREVOKED: u32 = 128;
341pub const EKEYREJECTED: u32 = 129;
342pub const EOWNERDEAD: u32 = 130;
343pub const ENOTRECOVERABLE: u32 = 131;
344pub const ERFKILL: u32 = 132;
345pub const EHWPOISON: u32 = 133;
346pub const EIEIO: u32 = 4095;
347pub const EOK: u32 = 0;
348pub const O_RDONLY: u32 = 0;
349pub const O_WRONLY: u32 = 1;
350pub const O_RDWR: u32 = 2;
351pub const O_CREAT: u32 = 64;
352pub const O_EXCL: u32 = 128;
353pub const O_TRUNC: u32 = 512;
354pub const O_APPEND: u32 = 1024;
355pub const SEEK_SET: u32 = 0;
356pub const SEEK_CUR: u32 = 1;
357pub const SEEK_END: u32 = 2;
358pub const __PRIFAST: &[u8; 2] = b"l\0";
359pub const __PRI64: &[u8; 2] = b"l\0";
360pub const __PRIPTR: &[u8; 2] = b"l\0";
361pub const PRId8: &[u8; 2] = b"d\0";
362pub const PRIi8: &[u8; 2] = b"i\0";
363pub const PRIdLEAST8: &[u8; 2] = b"d\0";
364pub const PRIiLEAST8: &[u8; 2] = b"i\0";
365pub const PRIdFAST8: &[u8; 2] = b"d\0";
366pub const PRIiFAST8: &[u8; 2] = b"i\0";
367pub const PRId16: &[u8; 2] = b"d\0";
368pub const PRIi16: &[u8; 2] = b"i\0";
369pub const PRIdLEAST16: &[u8; 2] = b"d\0";
370pub const PRIiLEAST16: &[u8; 2] = b"i\0";
371pub const PRIdFAST16: &[u8; 3] = b"ld\0";
372pub const PRIiFAST16: &[u8; 3] = b"li\0";
373pub const PRId32: &[u8; 2] = b"d\0";
374pub const PRIi32: &[u8; 2] = b"i\0";
375pub const PRIdLEAST32: &[u8; 2] = b"d\0";
376pub const PRIiLEAST32: &[u8; 2] = b"i\0";
377pub const PRIdFAST32: &[u8; 3] = b"ld\0";
378pub const PRIiFAST32: &[u8; 3] = b"li\0";
379pub const PRId64: &[u8; 3] = b"ld\0";
380pub const PRIi64: &[u8; 3] = b"li\0";
381pub const PRIdLEAST64: &[u8; 3] = b"ld\0";
382pub const PRIiLEAST64: &[u8; 3] = b"li\0";
383pub const PRIdFAST64: &[u8; 3] = b"ld\0";
384pub const PRIiFAST64: &[u8; 3] = b"li\0";
385pub const PRIdMAX: &[u8; 3] = b"ld\0";
386pub const PRIiMAX: &[u8; 3] = b"li\0";
387pub const PRIdPTR: &[u8; 3] = b"ld\0";
388pub const PRIiPTR: &[u8; 3] = b"li\0";
389pub const PRIo8: &[u8; 2] = b"o\0";
390pub const PRIu8: &[u8; 2] = b"u\0";
391pub const PRIx8: &[u8; 2] = b"x\0";
392pub const PRIX8: &[u8; 2] = b"X\0";
393pub const PRIoLEAST8: &[u8; 2] = b"o\0";
394pub const PRIuLEAST8: &[u8; 2] = b"u\0";
395pub const PRIxLEAST8: &[u8; 2] = b"x\0";
396pub const PRIXLEAST8: &[u8; 2] = b"X\0";
397pub const PRIoFAST8: &[u8; 2] = b"o\0";
398pub const PRIuFAST8: &[u8; 2] = b"u\0";
399pub const PRIxFAST8: &[u8; 2] = b"x\0";
400pub const PRIXFAST8: &[u8; 2] = b"X\0";
401pub const PRIo16: &[u8; 2] = b"o\0";
402pub const PRIu16: &[u8; 2] = b"u\0";
403pub const PRIx16: &[u8; 2] = b"x\0";
404pub const PRIX16: &[u8; 2] = b"X\0";
405pub const PRIoLEAST16: &[u8; 2] = b"o\0";
406pub const PRIuLEAST16: &[u8; 2] = b"u\0";
407pub const PRIxLEAST16: &[u8; 2] = b"x\0";
408pub const PRIXLEAST16: &[u8; 2] = b"X\0";
409pub const PRIoFAST16: &[u8; 3] = b"lo\0";
410pub const PRIuFAST16: &[u8; 3] = b"lu\0";
411pub const PRIxFAST16: &[u8; 3] = b"lx\0";
412pub const PRIXFAST16: &[u8; 3] = b"lX\0";
413pub const PRIo32: &[u8; 2] = b"o\0";
414pub const PRIu32: &[u8; 2] = b"u\0";
415pub const PRIx32: &[u8; 2] = b"x\0";
416pub const PRIX32: &[u8; 2] = b"X\0";
417pub const PRIoLEAST32: &[u8; 2] = b"o\0";
418pub const PRIuLEAST32: &[u8; 2] = b"u\0";
419pub const PRIxLEAST32: &[u8; 2] = b"x\0";
420pub const PRIXLEAST32: &[u8; 2] = b"X\0";
421pub const PRIoFAST32: &[u8; 3] = b"lo\0";
422pub const PRIuFAST32: &[u8; 3] = b"lu\0";
423pub const PRIxFAST32: &[u8; 3] = b"lx\0";
424pub const PRIXFAST32: &[u8; 3] = b"lX\0";
425pub const PRIo64: &[u8; 3] = b"lo\0";
426pub const PRIu64: &[u8; 3] = b"lu\0";
427pub const PRIx64: &[u8; 3] = b"lx\0";
428pub const PRIX64: &[u8; 3] = b"lX\0";
429pub const PRIoLEAST64: &[u8; 3] = b"lo\0";
430pub const PRIuLEAST64: &[u8; 3] = b"lu\0";
431pub const PRIxLEAST64: &[u8; 3] = b"lx\0";
432pub const PRIXLEAST64: &[u8; 3] = b"lX\0";
433pub const PRIoFAST64: &[u8; 3] = b"lo\0";
434pub const PRIuFAST64: &[u8; 3] = b"lu\0";
435pub const PRIxFAST64: &[u8; 3] = b"lx\0";
436pub const PRIXFAST64: &[u8; 3] = b"lX\0";
437pub const PRIoMAX: &[u8; 3] = b"lo\0";
438pub const PRIuMAX: &[u8; 3] = b"lu\0";
439pub const PRIxMAX: &[u8; 3] = b"lx\0";
440pub const PRIXMAX: &[u8; 3] = b"lX\0";
441pub const PRIoPTR: &[u8; 3] = b"lo\0";
442pub const PRIuPTR: &[u8; 3] = b"lu\0";
443pub const PRIxPTR: &[u8; 3] = b"lx\0";
444pub const PRIXPTR: &[u8; 3] = b"lX\0";
445pub const SCNi8: &[u8; 4] = b"hhi\0";
446pub const SCNi16: &[u8; 3] = b"hi\0";
447pub const SCNi32: &[u8; 2] = b"i\0";
448pub const SCNi64: &[u8; 3] = b"li\0";
449pub const SCNiLEAST8: &[u8; 4] = b"hhi\0";
450pub const SCNiLEAST16: &[u8; 3] = b"hi\0";
451pub const SCNiLEAST32: &[u8; 2] = b"i\0";
452pub const SCNiLEAST64: &[u8; 3] = b"li\0";
453pub const SCNiFAST8: &[u8; 4] = b"hhi\0";
454pub const SCNiFAST16: &[u8; 3] = b"li\0";
455pub const SCNiFAST32: &[u8; 3] = b"li\0";
456pub const SCNiFAST64: &[u8; 3] = b"li\0";
457pub const SCNiMAX: &[u8; 3] = b"li\0";
458pub const SCNiPTR: &[u8; 3] = b"li\0";
459pub const SCNd8: &[u8; 4] = b"hhd\0";
460pub const SCNd16: &[u8; 3] = b"hd\0";
461pub const SCNd32: &[u8; 2] = b"d\0";
462pub const SCNd64: &[u8; 3] = b"ld\0";
463pub const SCNdLEAST8: &[u8; 4] = b"hhd\0";
464pub const SCNdLEAST16: &[u8; 3] = b"hd\0";
465pub const SCNdLEAST32: &[u8; 2] = b"d\0";
466pub const SCNdLEAST64: &[u8; 3] = b"ld\0";
467pub const SCNdFAST8: &[u8; 4] = b"hhd\0";
468pub const SCNdFAST16: &[u8; 3] = b"ld\0";
469pub const SCNdFAST32: &[u8; 3] = b"ld\0";
470pub const SCNdFAST64: &[u8; 3] = b"ld\0";
471pub const SCNdMAX: &[u8; 3] = b"ld\0";
472pub const SCNdPTR: &[u8; 3] = b"ld\0";
473pub const SCNu8: &[u8; 4] = b"hhu\0";
474pub const SCNu16: &[u8; 3] = b"hu\0";
475pub const SCNu32: &[u8; 2] = b"u\0";
476pub const SCNu64: &[u8; 3] = b"lu\0";
477pub const SCNuLEAST8: &[u8; 4] = b"hhu\0";
478pub const SCNuLEAST16: &[u8; 3] = b"hu\0";
479pub const SCNuLEAST32: &[u8; 2] = b"u\0";
480pub const SCNuLEAST64: &[u8; 3] = b"lu\0";
481pub const SCNuFAST8: &[u8; 4] = b"hhu\0";
482pub const SCNuFAST16: &[u8; 3] = b"lu\0";
483pub const SCNuFAST32: &[u8; 3] = b"lu\0";
484pub const SCNuFAST64: &[u8; 3] = b"lu\0";
485pub const SCNuMAX: &[u8; 3] = b"lu\0";
486pub const SCNuPTR: &[u8; 3] = b"lu\0";
487pub const SCNo8: &[u8; 4] = b"hho\0";
488pub const SCNo16: &[u8; 3] = b"ho\0";
489pub const SCNo32: &[u8; 2] = b"o\0";
490pub const SCNo64: &[u8; 3] = b"lo\0";
491pub const SCNoLEAST8: &[u8; 4] = b"hho\0";
492pub const SCNoLEAST16: &[u8; 3] = b"ho\0";
493pub const SCNoLEAST32: &[u8; 2] = b"o\0";
494pub const SCNoLEAST64: &[u8; 3] = b"lo\0";
495pub const SCNoFAST8: &[u8; 4] = b"hho\0";
496pub const SCNoFAST16: &[u8; 3] = b"lo\0";
497pub const SCNoFAST32: &[u8; 3] = b"lo\0";
498pub const SCNoFAST64: &[u8; 3] = b"lo\0";
499pub const SCNoMAX: &[u8; 3] = b"lo\0";
500pub const SCNoPTR: &[u8; 3] = b"lo\0";
501pub const SCNx8: &[u8; 4] = b"hhx\0";
502pub const SCNx16: &[u8; 3] = b"hx\0";
503pub const SCNx32: &[u8; 2] = b"x\0";
504pub const SCNx64: &[u8; 3] = b"lx\0";
505pub const SCNxLEAST8: &[u8; 4] = b"hhx\0";
506pub const SCNxLEAST16: &[u8; 3] = b"hx\0";
507pub const SCNxLEAST32: &[u8; 2] = b"x\0";
508pub const SCNxLEAST64: &[u8; 3] = b"lx\0";
509pub const SCNxFAST8: &[u8; 4] = b"hhx\0";
510pub const SCNxFAST16: &[u8; 3] = b"lx\0";
511pub const SCNxFAST32: &[u8; 3] = b"lx\0";
512pub const SCNxFAST64: &[u8; 3] = b"lx\0";
513pub const SCNxMAX: &[u8; 3] = b"lx\0";
514pub const SCNxPTR: &[u8; 3] = b"lx\0";
515pub const DEBUG_BALLOC: u32 = 1;
516pub const DEBUG_BCACHE: u32 = 2;
517pub const DEBUG_BITMAP: u32 = 4;
518pub const DEBUG_BLOCK_GROUP: u32 = 8;
519pub const DEBUG_BLOCKDEV: u32 = 16;
520pub const DEBUG_DIR_IDX: u32 = 32;
521pub const DEBUG_DIR: u32 = 64;
522pub const DEBUG_EXTENT: u32 = 128;
523pub const DEBUG_FS: u32 = 256;
524pub const DEBUG_HASH: u32 = 512;
525pub const DEBUG_IALLOC: u32 = 1024;
526pub const DEBUG_INODE: u32 = 2048;
527pub const DEBUG_SUPER: u32 = 4096;
528pub const DEBUG_XATTR: u32 = 8192;
529pub const DEBUG_MKFS: u32 = 16384;
530pub const DEBUG_EXT4: u32 = 32768;
531pub const DEBUG_JBD: u32 = 65536;
532pub const DEBUG_MBR: u32 = 131072;
533pub const DEBUG_NOPREFIX: u32 = 2147483648;
534pub const DEBUG_ALL: u32 = 4294967295;
535pub const DBG_NONE: &[u8; 1] = b"\0";
536pub const DBG_INFO: &[u8; 9] = b"[info] \0";
537pub const DBG_WARN: &[u8; 9] = b"[warn] \0";
538pub const DBG_ERROR: &[u8; 9] = b"[error] \0";
539pub const SEEK_DATA: u32 = 3;
540pub const SEEK_HOLE: u32 = 4;
541pub const _DEFAULT_SOURCE: u32 = 1;
542pub const __MLIBC_BSD_OPTION: u32 = 1;
543pub const __MLIBC_LINUX_EPOLL_OPTION: u32 = 0;
544pub const __MLIBC_LINUX_TIMERFD_OPTION: u32 = 0;
545pub const __MLIBC_LINUX_SIGNALFD_OPTION: u32 = 0;
546pub const __MLIBC_POSIX_OPTION: u32 = 1;
547pub const __MLIBC_LINUX_OPTION: u32 = 0;
548pub const __MLIBC_GLIBC_OPTION: u32 = 1;
549pub const __MLIBC_SYSDEP_HAS_BITS_SYSCALL_H: u32 = 0;
550pub const __MLIBC_TWIZZLER: u32 = 1;
551pub const __MLIBC_EOF_BIT: u32 = 1;
552pub const __MLIBC_ERROR_BIT: u32 = 2;
553pub const _IOFBF: u32 = 1;
554pub const _IOLBF: u32 = 2;
555pub const _IONBF: u32 = 3;
556pub const BUFSIZ: u32 = 512;
557pub const EOF: i32 = -1;
558pub const FOPEN_MAX: u32 = 1024;
559pub const FILENAME_MAX: u32 = 256;
560pub const L_tmpnam: u32 = 256;
561pub const TMP_MAX: u32 = 1024;
562pub const P_tmpdir: &[u8; 5] = b"/tmp\0";
563pub const L_ctermid: u32 = 20;
564pub type __mlibc_uint8 = ::std::os::raw::c_uchar;
565pub type __mlibc_uint16 = ::std::os::raw::c_ushort;
566pub type __mlibc_uint32 = ::std::os::raw::c_uint;
567pub type __mlibc_uint64 = ::std::os::raw::c_ulong;
568pub type __mlibc_int8 = ::std::os::raw::c_schar;
569pub type __mlibc_int16 = ::std::os::raw::c_short;
570pub type __mlibc_int32 = ::std::os::raw::c_int;
571pub type __mlibc_int64 = ::std::os::raw::c_long;
572pub type __mlibc_int_fast8 = __mlibc_int8;
573pub type __mlibc_int_fast16 = __mlibc_int64;
574pub type __mlibc_int_fast32 = __mlibc_int64;
575pub type __mlibc_int_fast64 = __mlibc_int64;
576pub type __mlibc_uint_fast8 = __mlibc_uint8;
577pub type __mlibc_uint_fast16 = __mlibc_uint64;
578pub type __mlibc_uint_fast32 = __mlibc_uint64;
579pub type __mlibc_uint_fast64 = __mlibc_uint64;
580pub type __mlibc_intmax = ::std::os::raw::c_long;
581pub type __mlibc_intptr = ::std::os::raw::c_long;
582pub type __mlibc_ptrdiff = ::std::os::raw::c_long;
583pub type __mlibc_uintmax = ::std::os::raw::c_ulong;
584pub type __mlibc_uintptr = ::std::os::raw::c_ulong;
585pub type __mlibc_size = ::std::os::raw::c_ulong;
586pub type int_least8_t = __mlibc_int8;
587pub type int_least16_t = __mlibc_int16;
588pub type int_least32_t = __mlibc_int32;
589pub type int_least64_t = __mlibc_int64;
590pub type uint_least8_t = __mlibc_uint8;
591pub type uint_least16_t = __mlibc_uint16;
592pub type uint_least32_t = __mlibc_uint32;
593pub type uint_least64_t = __mlibc_uint64;
594pub type int_fast8_t = __mlibc_int_fast8;
595pub type int_fast16_t = __mlibc_int_fast16;
596pub type int_fast32_t = __mlibc_int_fast32;
597pub type int_fast64_t = __mlibc_int_fast64;
598pub type uint_fast8_t = __mlibc_uint_fast8;
599pub type uint_fast16_t = __mlibc_uint_fast16;
600pub type uint_fast32_t = __mlibc_uint_fast32;
601pub type uint_fast64_t = __mlibc_uint_fast64;
602pub type intmax_t = __mlibc_intmax;
603pub type uintmax_t = __mlibc_uintmax;
604pub type wchar_t = ::std::os::raw::c_int;
605#[repr(C)]
606#[repr(align(16))]
607#[derive(Debug, Copy, Clone)]
608pub struct max_align_t {
609 pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
610 pub __bindgen_padding_0: u64,
611 pub __clang_max_align_nonce2: u128,
612}
613#[allow(clippy::unnecessary_operation, clippy::identity_op)]
614const _: () = {
615 ["Size of max_align_t"][::std::mem::size_of::<max_align_t>() - 32usize];
616 ["Alignment of max_align_t"][::std::mem::align_of::<max_align_t>() - 16usize];
617 ["Offset of field: max_align_t::__clang_max_align_nonce1"]
618 [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce1) - 0usize];
619 ["Offset of field: max_align_t::__clang_max_align_nonce2"]
620 [::std::mem::offset_of!(max_align_t, __clang_max_align_nonce2) - 16usize];
621};
622#[doc = "@brief Single block descriptor"]
623#[repr(C)]
624#[derive(Debug, Copy, Clone)]
625pub struct ext4_block {
626 #[doc = "@brief Logical block ID"]
627 pub lb_id: u64,
628 #[doc = "@brief Buffer"]
629 pub buf: *mut ext4_buf,
630 #[doc = "@brief Data buffer."]
631 pub data: *mut u8,
632}
633#[allow(clippy::unnecessary_operation, clippy::identity_op)]
634const _: () = {
635 ["Size of ext4_block"][::std::mem::size_of::<ext4_block>() - 24usize];
636 ["Alignment of ext4_block"][::std::mem::align_of::<ext4_block>() - 8usize];
637 ["Offset of field: ext4_block::lb_id"][::std::mem::offset_of!(ext4_block, lb_id) - 0usize];
638 ["Offset of field: ext4_block::buf"][::std::mem::offset_of!(ext4_block, buf) - 8usize];
639 ["Offset of field: ext4_block::data"][::std::mem::offset_of!(ext4_block, data) - 16usize];
640};
641pub const bcache_state_bits_BC_UPTODATE: bcache_state_bits = 0;
642pub const bcache_state_bits_BC_DIRTY: bcache_state_bits = 1;
643pub const bcache_state_bits_BC_FLUSH: bcache_state_bits = 2;
644pub const bcache_state_bits_BC_TMP: bcache_state_bits = 3;
645#[doc = "@brief buffer state bits\n\n - BC_UPTODATE: Buffer contains valid data.\n - BC_DIRTY: Buffer is dirty.\n - BC_FLUSH: Buffer will be immediately flushed,\n when no one references it.\n - BC_TMP: Buffer will be dropped once its refctr\n reaches zero."]
646pub type bcache_state_bits = ::std::os::raw::c_uint;
647#[doc = "@brief Single block descriptor"]
648#[repr(C)]
649#[derive(Debug, Copy, Clone)]
650pub struct ext4_buf {
651 #[doc = "@brief Flags"]
652 pub flags: [::std::os::raw::c_char; 4usize],
653 #[doc = "@brief Logical block address"]
654 pub lba: u64,
655 #[doc = "@brief Data buffer."]
656 pub data: *mut u8,
657 #[doc = "@brief LRU priority. (unused)"]
658 pub lru_prio: u32,
659 #[doc = "@brief LRU id."]
660 pub lru_id: u32,
661 #[doc = "@brief Reference count table"]
662 pub refctr: u32,
663 #[doc = "@brief The block cache this buffer belongs to."]
664 pub bc: *mut ext4_bcache,
665 #[doc = "@brief Whether or not buffer is on dirty list."]
666 pub on_dirty_list: bool,
667 #[doc = "@brief LBA tree node"]
668 pub lba_node: ext4_buf__bindgen_ty_1,
669 #[doc = "@brief LRU tree node"]
670 pub lru_node: ext4_buf__bindgen_ty_2,
671 #[doc = "@brief Dirty list node"]
672 pub dirty_node: ext4_buf__bindgen_ty_3,
673 #[doc = "@brief Callback routine after a disk-write operation.\n @param bc block cache descriptor\n @param buf buffer descriptor\n @param standard error code returned by bdev->bwrite()\n @param arg argument passed to this routine"]
674 pub end_write: ::std::option::Option<
675 unsafe extern "C" fn(
676 bc: *mut ext4_bcache,
677 buf: *mut ext4_buf,
678 res: ::std::os::raw::c_int,
679 arg: *mut ::std::os::raw::c_void,
680 ),
681 >,
682 #[doc = "@brief argument passed to end_write() callback."]
683 pub end_write_arg: *mut ::std::os::raw::c_void,
684}
685#[doc = "@brief LBA tree node"]
686#[repr(C)]
687#[derive(Debug, Copy, Clone)]
688pub struct ext4_buf__bindgen_ty_1 {
689 pub rbe_left: *mut ext4_buf,
690 pub rbe_right: *mut ext4_buf,
691 pub rbe_parent: *mut ext4_buf,
692 pub rbe_color: ::std::os::raw::c_int,
693}
694#[allow(clippy::unnecessary_operation, clippy::identity_op)]
695const _: () = {
696 ["Size of ext4_buf__bindgen_ty_1"][::std::mem::size_of::<ext4_buf__bindgen_ty_1>() - 32usize];
697 ["Alignment of ext4_buf__bindgen_ty_1"]
698 [::std::mem::align_of::<ext4_buf__bindgen_ty_1>() - 8usize];
699 ["Offset of field: ext4_buf__bindgen_ty_1::rbe_left"]
700 [::std::mem::offset_of!(ext4_buf__bindgen_ty_1, rbe_left) - 0usize];
701 ["Offset of field: ext4_buf__bindgen_ty_1::rbe_right"]
702 [::std::mem::offset_of!(ext4_buf__bindgen_ty_1, rbe_right) - 8usize];
703 ["Offset of field: ext4_buf__bindgen_ty_1::rbe_parent"]
704 [::std::mem::offset_of!(ext4_buf__bindgen_ty_1, rbe_parent) - 16usize];
705 ["Offset of field: ext4_buf__bindgen_ty_1::rbe_color"]
706 [::std::mem::offset_of!(ext4_buf__bindgen_ty_1, rbe_color) - 24usize];
707};
708#[doc = "@brief LRU tree node"]
709#[repr(C)]
710#[derive(Debug, Copy, Clone)]
711pub struct ext4_buf__bindgen_ty_2 {
712 pub rbe_left: *mut ext4_buf,
713 pub rbe_right: *mut ext4_buf,
714 pub rbe_parent: *mut ext4_buf,
715 pub rbe_color: ::std::os::raw::c_int,
716}
717#[allow(clippy::unnecessary_operation, clippy::identity_op)]
718const _: () = {
719 ["Size of ext4_buf__bindgen_ty_2"][::std::mem::size_of::<ext4_buf__bindgen_ty_2>() - 32usize];
720 ["Alignment of ext4_buf__bindgen_ty_2"]
721 [::std::mem::align_of::<ext4_buf__bindgen_ty_2>() - 8usize];
722 ["Offset of field: ext4_buf__bindgen_ty_2::rbe_left"]
723 [::std::mem::offset_of!(ext4_buf__bindgen_ty_2, rbe_left) - 0usize];
724 ["Offset of field: ext4_buf__bindgen_ty_2::rbe_right"]
725 [::std::mem::offset_of!(ext4_buf__bindgen_ty_2, rbe_right) - 8usize];
726 ["Offset of field: ext4_buf__bindgen_ty_2::rbe_parent"]
727 [::std::mem::offset_of!(ext4_buf__bindgen_ty_2, rbe_parent) - 16usize];
728 ["Offset of field: ext4_buf__bindgen_ty_2::rbe_color"]
729 [::std::mem::offset_of!(ext4_buf__bindgen_ty_2, rbe_color) - 24usize];
730};
731#[doc = "@brief Dirty list node"]
732#[repr(C)]
733#[derive(Debug, Copy, Clone)]
734pub struct ext4_buf__bindgen_ty_3 {
735 pub sle_next: *mut ext4_buf,
736}
737#[allow(clippy::unnecessary_operation, clippy::identity_op)]
738const _: () = {
739 ["Size of ext4_buf__bindgen_ty_3"][::std::mem::size_of::<ext4_buf__bindgen_ty_3>() - 8usize];
740 ["Alignment of ext4_buf__bindgen_ty_3"]
741 [::std::mem::align_of::<ext4_buf__bindgen_ty_3>() - 8usize];
742 ["Offset of field: ext4_buf__bindgen_ty_3::sle_next"]
743 [::std::mem::offset_of!(ext4_buf__bindgen_ty_3, sle_next) - 0usize];
744};
745#[allow(clippy::unnecessary_operation, clippy::identity_op)]
746const _: () = {
747 ["Size of ext4_buf"][::std::mem::size_of::<ext4_buf>() - 144usize];
748 ["Alignment of ext4_buf"][::std::mem::align_of::<ext4_buf>() - 8usize];
749 ["Offset of field: ext4_buf::flags"][::std::mem::offset_of!(ext4_buf, flags) - 0usize];
750 ["Offset of field: ext4_buf::lba"][::std::mem::offset_of!(ext4_buf, lba) - 8usize];
751 ["Offset of field: ext4_buf::data"][::std::mem::offset_of!(ext4_buf, data) - 16usize];
752 ["Offset of field: ext4_buf::lru_prio"][::std::mem::offset_of!(ext4_buf, lru_prio) - 24usize];
753 ["Offset of field: ext4_buf::lru_id"][::std::mem::offset_of!(ext4_buf, lru_id) - 28usize];
754 ["Offset of field: ext4_buf::refctr"][::std::mem::offset_of!(ext4_buf, refctr) - 32usize];
755 ["Offset of field: ext4_buf::bc"][::std::mem::offset_of!(ext4_buf, bc) - 40usize];
756 ["Offset of field: ext4_buf::on_dirty_list"]
757 [::std::mem::offset_of!(ext4_buf, on_dirty_list) - 48usize];
758 ["Offset of field: ext4_buf::lba_node"][::std::mem::offset_of!(ext4_buf, lba_node) - 56usize];
759 ["Offset of field: ext4_buf::lru_node"][::std::mem::offset_of!(ext4_buf, lru_node) - 88usize];
760 ["Offset of field: ext4_buf::dirty_node"]
761 [::std::mem::offset_of!(ext4_buf, dirty_node) - 120usize];
762 ["Offset of field: ext4_buf::end_write"]
763 [::std::mem::offset_of!(ext4_buf, end_write) - 128usize];
764 ["Offset of field: ext4_buf::end_write_arg"]
765 [::std::mem::offset_of!(ext4_buf, end_write_arg) - 136usize];
766};
767#[doc = "@brief Block cache descriptor"]
768#[repr(C)]
769#[derive(Debug, Copy, Clone)]
770pub struct ext4_bcache {
771 #[doc = "@brief Item count in block cache"]
772 pub cnt: u32,
773 #[doc = "@brief Item size in block cache"]
774 pub itemsize: u32,
775 #[doc = "@brief Last recently used counter"]
776 pub lru_ctr: u32,
777 #[doc = "@brief Currently referenced datablocks"]
778 pub ref_blocks: u32,
779 #[doc = "@brief Maximum referenced datablocks"]
780 pub max_ref_blocks: u32,
781 #[doc = "@brief The blockdev binded to this block cache"]
782 pub bdev: *mut ext4_blockdev,
783 #[doc = "@brief The cache should not be shaked"]
784 pub dont_shake: bool,
785 #[doc = "@brief A tree holding all bufs"]
786 pub lba_root: ext4_bcache_ext4_buf_lba,
787 #[doc = "@brief A tree holding unreferenced bufs"]
788 pub lru_root: ext4_bcache_ext4_buf_lru,
789 #[doc = "@brief A singly-linked list holding dirty buffers"]
790 pub dirty_list: ext4_bcache_ext4_buf_dirty,
791}
792#[doc = "@brief A tree holding all bufs"]
793#[repr(C)]
794#[derive(Debug, Copy, Clone)]
795pub struct ext4_bcache_ext4_buf_lba {
796 pub rbh_root: *mut ext4_buf,
797}
798#[allow(clippy::unnecessary_operation, clippy::identity_op)]
799const _: () = {
800 ["Size of ext4_bcache_ext4_buf_lba"]
801 [::std::mem::size_of::<ext4_bcache_ext4_buf_lba>() - 8usize];
802 ["Alignment of ext4_bcache_ext4_buf_lba"]
803 [::std::mem::align_of::<ext4_bcache_ext4_buf_lba>() - 8usize];
804 ["Offset of field: ext4_bcache_ext4_buf_lba::rbh_root"]
805 [::std::mem::offset_of!(ext4_bcache_ext4_buf_lba, rbh_root) - 0usize];
806};
807#[doc = "@brief A tree holding unreferenced bufs"]
808#[repr(C)]
809#[derive(Debug, Copy, Clone)]
810pub struct ext4_bcache_ext4_buf_lru {
811 pub rbh_root: *mut ext4_buf,
812}
813#[allow(clippy::unnecessary_operation, clippy::identity_op)]
814const _: () = {
815 ["Size of ext4_bcache_ext4_buf_lru"]
816 [::std::mem::size_of::<ext4_bcache_ext4_buf_lru>() - 8usize];
817 ["Alignment of ext4_bcache_ext4_buf_lru"]
818 [::std::mem::align_of::<ext4_bcache_ext4_buf_lru>() - 8usize];
819 ["Offset of field: ext4_bcache_ext4_buf_lru::rbh_root"]
820 [::std::mem::offset_of!(ext4_bcache_ext4_buf_lru, rbh_root) - 0usize];
821};
822#[doc = "@brief A singly-linked list holding dirty buffers"]
823#[repr(C)]
824#[derive(Debug, Copy, Clone)]
825pub struct ext4_bcache_ext4_buf_dirty {
826 pub slh_first: *mut ext4_buf,
827}
828#[allow(clippy::unnecessary_operation, clippy::identity_op)]
829const _: () = {
830 ["Size of ext4_bcache_ext4_buf_dirty"]
831 [::std::mem::size_of::<ext4_bcache_ext4_buf_dirty>() - 8usize];
832 ["Alignment of ext4_bcache_ext4_buf_dirty"]
833 [::std::mem::align_of::<ext4_bcache_ext4_buf_dirty>() - 8usize];
834 ["Offset of field: ext4_bcache_ext4_buf_dirty::slh_first"]
835 [::std::mem::offset_of!(ext4_bcache_ext4_buf_dirty, slh_first) - 0usize];
836};
837#[allow(clippy::unnecessary_operation, clippy::identity_op)]
838const _: () = {
839 ["Size of ext4_bcache"][::std::mem::size_of::<ext4_bcache>() - 64usize];
840 ["Alignment of ext4_bcache"][::std::mem::align_of::<ext4_bcache>() - 8usize];
841 ["Offset of field: ext4_bcache::cnt"][::std::mem::offset_of!(ext4_bcache, cnt) - 0usize];
842 ["Offset of field: ext4_bcache::itemsize"]
843 [::std::mem::offset_of!(ext4_bcache, itemsize) - 4usize];
844 ["Offset of field: ext4_bcache::lru_ctr"]
845 [::std::mem::offset_of!(ext4_bcache, lru_ctr) - 8usize];
846 ["Offset of field: ext4_bcache::ref_blocks"]
847 [::std::mem::offset_of!(ext4_bcache, ref_blocks) - 12usize];
848 ["Offset of field: ext4_bcache::max_ref_blocks"]
849 [::std::mem::offset_of!(ext4_bcache, max_ref_blocks) - 16usize];
850 ["Offset of field: ext4_bcache::bdev"][::std::mem::offset_of!(ext4_bcache, bdev) - 24usize];
851 ["Offset of field: ext4_bcache::dont_shake"]
852 [::std::mem::offset_of!(ext4_bcache, dont_shake) - 32usize];
853 ["Offset of field: ext4_bcache::lba_root"]
854 [::std::mem::offset_of!(ext4_bcache, lba_root) - 40usize];
855 ["Offset of field: ext4_bcache::lru_root"]
856 [::std::mem::offset_of!(ext4_bcache, lru_root) - 48usize];
857 ["Offset of field: ext4_bcache::dirty_list"]
858 [::std::mem::offset_of!(ext4_bcache, dirty_list) - 56usize];
859};
860unsafe extern "C" {
861 #[doc = "@brief Dynamic initialization of block cache.\n @param bc block cache descriptor\n @param cnt items count in block cache\n @param itemsize single item size (in bytes)\n @return standard error code"]
862 pub fn ext4_bcache_init_dynamic(
863 bc: *mut ext4_bcache,
864 cnt: u32,
865 itemsize: u32,
866 ) -> ::std::os::raw::c_int;
867}
868unsafe extern "C" {
869 #[doc = "@brief Do cleanup works on block cache.\n @param bc block cache descriptor."]
870 pub fn ext4_bcache_cleanup(bc: *mut ext4_bcache);
871}
872unsafe extern "C" {
873 pub fn ext4_bcache_flush(bc: *mut ext4_bcache);
874}
875unsafe extern "C" {
876 #[doc = "@brief Dynamic de-initialization of block cache.\n @param bc block cache descriptor\n @return standard error code"]
877 pub fn ext4_bcache_fini_dynamic(bc: *mut ext4_bcache) -> ::std::os::raw::c_int;
878}
879unsafe extern "C" {
880 #[doc = "@brief Get a buffer with the lowest LRU counter in bcache.\n @param bc block cache descriptor\n @return buffer with the lowest LRU counter"]
881 pub fn ext4_buf_lowest_lru(bc: *mut ext4_bcache) -> *mut ext4_buf;
882}
883unsafe extern "C" {
884 #[doc = "@brief Drop unreferenced buffer from bcache.\n @param bc block cache descriptor\n @param buf buffer"]
885 pub fn ext4_bcache_drop_buf(bc: *mut ext4_bcache, buf: *mut ext4_buf);
886}
887unsafe extern "C" {
888 #[doc = "@brief Invalidate a range of buffers.\n @param bc block cache descriptor\n @param from starting lba\n @param cnt block counts"]
889 pub fn ext4_bcache_invalidate_lba(bc: *mut ext4_bcache, from: u64, cnt: u32);
890}
891unsafe extern "C" {
892 #[doc = "@brief Find existing buffer from block cache memory.\n Unreferenced block allocation is based on LRU\n (Last Recently Used) algorithm.\n @param bc block cache descriptor\n @param b block to alloc\n @param lba logical block address\n @return block cache buffer"]
893 pub fn ext4_bcache_find_get(
894 bc: *mut ext4_bcache,
895 b: *mut ext4_block,
896 lba: u64,
897 ) -> *mut ext4_buf;
898}
899unsafe extern "C" {
900 #[doc = "@brief Allocate block from block cache memory.\n Unreferenced block allocation is based on LRU\n (Last Recently Used) algorithm.\n @param bc block cache descriptor\n @param b block to alloc\n @param is_new block is new (needs to be read)\n @return standard error code"]
901 pub fn ext4_bcache_alloc(
902 bc: *mut ext4_bcache,
903 b: *mut ext4_block,
904 is_new: *mut bool,
905 ) -> ::std::os::raw::c_int;
906}
907unsafe extern "C" {
908 #[doc = "@brief Free block from cache memory (decrement reference counter).\n @param bc block cache descriptor\n @param b block to free\n @return standard error code"]
909 pub fn ext4_bcache_free(bc: *mut ext4_bcache, b: *mut ext4_block) -> ::std::os::raw::c_int;
910}
911unsafe extern "C" {
912 #[doc = "@brief Return a full status of block cache.\n @param bc block cache descriptor\n @return full status"]
913 pub fn ext4_bcache_is_full(bc: *mut ext4_bcache) -> bool;
914}
915#[repr(C)]
916#[derive(Debug, Copy, Clone)]
917pub struct ext4_blockdev_iface {
918 #[doc = "@brief Open device function\n @param bdev block device."]
919 pub open: ::std::option::Option<
920 unsafe extern "C" fn(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int,
921 >,
922 #[doc = "@brief Block read function.\n @param bdev block device\n @param buf output buffer\n @param blk_id block id\n @param blk_cnt block count"]
923 pub bread: ::std::option::Option<
924 unsafe extern "C" fn(
925 bdev: *mut ext4_blockdev,
926 buf: *mut ::std::os::raw::c_void,
927 blk_id: u64,
928 blk_cnt: u32,
929 ) -> ::std::os::raw::c_int,
930 >,
931 #[doc = "@brief Block write function.\n @param buf input buffer\n @param blk_id block id\n @param blk_cnt block count"]
932 pub bwrite: ::std::option::Option<
933 unsafe extern "C" fn(
934 bdev: *mut ext4_blockdev,
935 buf: *const ::std::os::raw::c_void,
936 blk_id: u64,
937 blk_cnt: u32,
938 ) -> ::std::os::raw::c_int,
939 >,
940 #[doc = "@brief Close device function.\n @param bdev block device."]
941 pub close: ::std::option::Option<
942 unsafe extern "C" fn(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int,
943 >,
944 #[doc = "@brief Lock block device. Required in multi partition mode\n operations. Not mandatory field.\n @param bdev block device."]
945 pub lock: ::std::option::Option<
946 unsafe extern "C" fn(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int,
947 >,
948 #[doc = "@brief Unlock block device. Required in multi partition mode\n operations. Not mandatory field.\n @param bdev block device."]
949 pub unlock: ::std::option::Option<
950 unsafe extern "C" fn(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int,
951 >,
952 #[doc = "@brief Block size (bytes): physical"]
953 pub ph_bsize: u32,
954 #[doc = "@brief Block count: physical"]
955 pub ph_bcnt: u64,
956 #[doc = "@brief Block size buffer: physical"]
957 pub ph_bbuf: *mut u8,
958 #[doc = "@brief Reference counter to block device interface"]
959 pub ph_refctr: u32,
960 #[doc = "@brief Physical read counter"]
961 pub bread_ctr: u32,
962 #[doc = "@brief Physical write counter"]
963 pub bwrite_ctr: u32,
964 #[doc = "@brief User data pointer"]
965 pub p_user: *mut ::std::os::raw::c_void,
966}
967#[allow(clippy::unnecessary_operation, clippy::identity_op)]
968const _: () = {
969 ["Size of ext4_blockdev_iface"][::std::mem::size_of::<ext4_blockdev_iface>() - 96usize];
970 ["Alignment of ext4_blockdev_iface"][::std::mem::align_of::<ext4_blockdev_iface>() - 8usize];
971 ["Offset of field: ext4_blockdev_iface::open"]
972 [::std::mem::offset_of!(ext4_blockdev_iface, open) - 0usize];
973 ["Offset of field: ext4_blockdev_iface::bread"]
974 [::std::mem::offset_of!(ext4_blockdev_iface, bread) - 8usize];
975 ["Offset of field: ext4_blockdev_iface::bwrite"]
976 [::std::mem::offset_of!(ext4_blockdev_iface, bwrite) - 16usize];
977 ["Offset of field: ext4_blockdev_iface::close"]
978 [::std::mem::offset_of!(ext4_blockdev_iface, close) - 24usize];
979 ["Offset of field: ext4_blockdev_iface::lock"]
980 [::std::mem::offset_of!(ext4_blockdev_iface, lock) - 32usize];
981 ["Offset of field: ext4_blockdev_iface::unlock"]
982 [::std::mem::offset_of!(ext4_blockdev_iface, unlock) - 40usize];
983 ["Offset of field: ext4_blockdev_iface::ph_bsize"]
984 [::std::mem::offset_of!(ext4_blockdev_iface, ph_bsize) - 48usize];
985 ["Offset of field: ext4_blockdev_iface::ph_bcnt"]
986 [::std::mem::offset_of!(ext4_blockdev_iface, ph_bcnt) - 56usize];
987 ["Offset of field: ext4_blockdev_iface::ph_bbuf"]
988 [::std::mem::offset_of!(ext4_blockdev_iface, ph_bbuf) - 64usize];
989 ["Offset of field: ext4_blockdev_iface::ph_refctr"]
990 [::std::mem::offset_of!(ext4_blockdev_iface, ph_refctr) - 72usize];
991 ["Offset of field: ext4_blockdev_iface::bread_ctr"]
992 [::std::mem::offset_of!(ext4_blockdev_iface, bread_ctr) - 76usize];
993 ["Offset of field: ext4_blockdev_iface::bwrite_ctr"]
994 [::std::mem::offset_of!(ext4_blockdev_iface, bwrite_ctr) - 80usize];
995 ["Offset of field: ext4_blockdev_iface::p_user"]
996 [::std::mem::offset_of!(ext4_blockdev_iface, p_user) - 88usize];
997};
998#[doc = "@brief Definition of the simple block device."]
999#[repr(C)]
1000#[derive(Debug, Copy, Clone)]
1001pub struct ext4_blockdev {
1002 #[doc = "@brief Block device interface"]
1003 pub bdif: *mut ext4_blockdev_iface,
1004 #[doc = "@brief Offset in bdif. For multi partition mode."]
1005 pub part_offset: u64,
1006 #[doc = "@brief Part size in bdif. For multi partition mode."]
1007 pub part_size: u64,
1008 #[doc = "@brief Block cache."]
1009 pub bc: *mut ext4_bcache,
1010 #[doc = "@brief Block size (bytes) logical"]
1011 pub lg_bsize: u32,
1012 #[doc = "@brief Block count: logical"]
1013 pub lg_bcnt: u64,
1014 #[doc = "@brief Cache write back mode reference counter"]
1015 pub cache_write_back: u32,
1016 #[doc = "@brief The filesystem this block device belongs to."]
1017 pub fs: *mut ext4_fs,
1018 pub journal: *mut ::std::os::raw::c_void,
1019}
1020#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1021const _: () = {
1022 ["Size of ext4_blockdev"][::std::mem::size_of::<ext4_blockdev>() - 72usize];
1023 ["Alignment of ext4_blockdev"][::std::mem::align_of::<ext4_blockdev>() - 8usize];
1024 ["Offset of field: ext4_blockdev::bdif"][::std::mem::offset_of!(ext4_blockdev, bdif) - 0usize];
1025 ["Offset of field: ext4_blockdev::part_offset"]
1026 [::std::mem::offset_of!(ext4_blockdev, part_offset) - 8usize];
1027 ["Offset of field: ext4_blockdev::part_size"]
1028 [::std::mem::offset_of!(ext4_blockdev, part_size) - 16usize];
1029 ["Offset of field: ext4_blockdev::bc"][::std::mem::offset_of!(ext4_blockdev, bc) - 24usize];
1030 ["Offset of field: ext4_blockdev::lg_bsize"]
1031 [::std::mem::offset_of!(ext4_blockdev, lg_bsize) - 32usize];
1032 ["Offset of field: ext4_blockdev::lg_bcnt"]
1033 [::std::mem::offset_of!(ext4_blockdev, lg_bcnt) - 40usize];
1034 ["Offset of field: ext4_blockdev::cache_write_back"]
1035 [::std::mem::offset_of!(ext4_blockdev, cache_write_back) - 48usize];
1036 ["Offset of field: ext4_blockdev::fs"][::std::mem::offset_of!(ext4_blockdev, fs) - 56usize];
1037 ["Offset of field: ext4_blockdev::journal"]
1038 [::std::mem::offset_of!(ext4_blockdev, journal) - 64usize];
1039};
1040unsafe extern "C" {
1041 #[doc = "@brief Block device initialization.\n @param bdev block device descriptor\n @return standard error code"]
1042 pub fn ext4_block_init(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int;
1043}
1044unsafe extern "C" {
1045 #[doc = "@brief Binds a bcache to block device.\n @param bdev block device descriptor\n @param bc block cache descriptor\n @return standard error code"]
1046 pub fn ext4_block_bind_bcache(
1047 bdev: *mut ext4_blockdev,
1048 bc: *mut ext4_bcache,
1049 ) -> ::std::os::raw::c_int;
1050}
1051unsafe extern "C" {
1052 #[doc = "@brief Close block device\n @param bdev block device descriptor\n @return standard error code"]
1053 pub fn ext4_block_fini(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int;
1054}
1055unsafe extern "C" {
1056 #[doc = "@brief Flush data in given buffer to disk.\n @param bdev block device descriptor\n @param buf buffer\n @return standard error code"]
1057 pub fn ext4_block_flush_buf(
1058 bdev: *mut ext4_blockdev,
1059 buf: *mut ext4_buf,
1060 ) -> ::std::os::raw::c_int;
1061}
1062unsafe extern "C" {
1063 #[doc = "@brief Flush data in buffer of given lba to disk,\n if that buffer exists in block cache.\n @param bdev block device descriptor\n @param lba logical block address\n @return standard error code"]
1064 pub fn ext4_block_flush_lba(bdev: *mut ext4_blockdev, lba: u64) -> ::std::os::raw::c_int;
1065}
1066unsafe extern "C" {
1067 #[doc = "@brief Set logical block size in block device.\n @param bdev block device descriptor\n @param lb_bsize logical block size (in bytes)"]
1068 pub fn ext4_block_set_lb_size(bdev: *mut ext4_blockdev, lb_bsize: u32);
1069}
1070unsafe extern "C" {
1071 #[doc = "@brief Block get function (through cache, don't read).\n @param bdev block device descriptor\n @param b block descriptor\n @param lba logical block address\n @return standard error code"]
1072 pub fn ext4_block_get_noread(
1073 bdev: *mut ext4_blockdev,
1074 b: *mut ext4_block,
1075 lba: u64,
1076 ) -> ::std::os::raw::c_int;
1077}
1078unsafe extern "C" {
1079 #[doc = "@brief Block get function (through cache).\n @param bdev block device descriptor\n @param b block descriptor\n @param lba logical block address\n @return standard error code"]
1080 pub fn ext4_block_get(
1081 bdev: *mut ext4_blockdev,
1082 b: *mut ext4_block,
1083 lba: u64,
1084 ) -> ::std::os::raw::c_int;
1085}
1086unsafe extern "C" {
1087 #[doc = "@brief Block set procedure (through cache).\n @param bdev block device descriptor\n @param b block descriptor\n @return standard error code"]
1088 pub fn ext4_block_set(bdev: *mut ext4_blockdev, b: *mut ext4_block) -> ::std::os::raw::c_int;
1089}
1090unsafe extern "C" {
1091 #[doc = "@brief Block read procedure (without cache)\n @param bdev block device descriptor\n @param buf output buffer\n @param lba logical block address\n @return standard error code"]
1092 pub fn ext4_blocks_get_direct(
1093 bdev: *mut ext4_blockdev,
1094 buf: *mut ::std::os::raw::c_void,
1095 lba: u64,
1096 cnt: u32,
1097 ) -> ::std::os::raw::c_int;
1098}
1099unsafe extern "C" {
1100 #[doc = "@brief Block write procedure (without cache)\n @param bdev block device descriptor\n @param buf output buffer\n @param lba logical block address\n @return standard error code"]
1101 pub fn ext4_blocks_set_direct(
1102 bdev: *mut ext4_blockdev,
1103 buf: *const ::std::os::raw::c_void,
1104 lba: u64,
1105 cnt: u32,
1106 ) -> ::std::os::raw::c_int;
1107}
1108unsafe extern "C" {
1109 #[doc = "@brief Write to block device (by direct address).\n @param bdev block device descriptor\n @param off byte offset in block device\n @param buf input buffer\n @param len length of the write buffer\n @return standard error code"]
1110 pub fn ext4_block_writebytes(
1111 bdev: *mut ext4_blockdev,
1112 off: u64,
1113 buf: *const ::std::os::raw::c_void,
1114 len: u32,
1115 ) -> ::std::os::raw::c_int;
1116}
1117unsafe extern "C" {
1118 #[doc = "@brief Read freom block device (by direct address).\n @param bdev block device descriptor\n @param off byte offset in block device\n @param buf input buffer\n @param len length of the write buffer\n @return standard error code"]
1119 pub fn ext4_block_readbytes(
1120 bdev: *mut ext4_blockdev,
1121 off: u64,
1122 buf: *mut ::std::os::raw::c_void,
1123 len: u32,
1124 ) -> ::std::os::raw::c_int;
1125}
1126unsafe extern "C" {
1127 #[doc = "@brief Flush all dirty buffers to disk\n @param bdev block device descriptor\n @return standard error code"]
1128 pub fn ext4_block_cache_flush(bdev: *mut ext4_blockdev) -> ::std::os::raw::c_int;
1129}
1130unsafe extern "C" {
1131 #[doc = "@brief Enable/disable write back cache mode\n @param bdev block device descriptor\n @param on_off\n !0 - ENABLE\n 0 - DISABLE (all delayed cache buffers will be flushed)\n @return standard error code"]
1132 pub fn ext4_block_cache_write_back(
1133 bdev: *mut ext4_blockdev,
1134 on_off: u8,
1135 ) -> ::std::os::raw::c_int;
1136}
1137pub type ext4_lblk_t = u32;
1138pub type ext4_fsblk_t = u64;
1139#[repr(C, packed)]
1140#[derive(Debug, Copy, Clone)]
1141pub struct ext4_sblock {
1142 pub inodes_count: u32,
1143 pub blocks_count_lo: u32,
1144 pub reserved_blocks_count_lo: u32,
1145 pub free_blocks_count_lo: u32,
1146 pub free_inodes_count: u32,
1147 pub first_data_block: u32,
1148 pub log_block_size: u32,
1149 pub log_cluster_size: u32,
1150 pub blocks_per_group: u32,
1151 pub frags_per_group: u32,
1152 pub inodes_per_group: u32,
1153 pub mount_time: u32,
1154 pub write_time: u32,
1155 pub mount_count: u16,
1156 pub max_mount_count: u16,
1157 pub magic: u16,
1158 pub state: u16,
1159 pub errors: u16,
1160 pub minor_rev_level: u16,
1161 pub last_check_time: u32,
1162 pub check_interval: u32,
1163 pub creator_os: u32,
1164 pub rev_level: u32,
1165 pub def_resuid: u16,
1166 pub def_resgid: u16,
1167 pub first_inode: u32,
1168 pub inode_size: u16,
1169 pub block_group_index: u16,
1170 pub features_compatible: u32,
1171 pub features_incompatible: u32,
1172 pub features_read_only: u32,
1173 pub uuid: [u8; 16usize],
1174 pub volume_name: [::std::os::raw::c_char; 16usize],
1175 pub last_mounted: [::std::os::raw::c_char; 64usize],
1176 pub algorithm_usage_bitmap: u32,
1177 pub s_prealloc_blocks: u8,
1178 pub s_prealloc_dir_blocks: u8,
1179 pub s_reserved_gdt_blocks: u16,
1180 pub journal_uuid: [u8; 16usize],
1181 pub journal_inode_number: u32,
1182 pub journal_dev: u32,
1183 pub last_orphan: u32,
1184 pub hash_seed: [u32; 4usize],
1185 pub default_hash_version: u8,
1186 pub journal_backup_type: u8,
1187 pub desc_size: u16,
1188 pub default_mount_opts: u32,
1189 pub first_meta_bg: u32,
1190 pub mkfs_time: u32,
1191 pub journal_blocks: [u32; 17usize],
1192 pub blocks_count_hi: u32,
1193 pub reserved_blocks_count_hi: u32,
1194 pub free_blocks_count_hi: u32,
1195 pub min_extra_isize: u16,
1196 pub want_extra_isize: u16,
1197 pub flags: u32,
1198 pub raid_stride: u16,
1199 pub mmp_interval: u16,
1200 pub mmp_block: u64,
1201 pub raid_stripe_width: u32,
1202 pub log_groups_per_flex: u8,
1203 pub checksum_type: u8,
1204 pub reserved_pad: u16,
1205 pub kbytes_written: u64,
1206 pub snapshot_inum: u32,
1207 pub snapshot_id: u32,
1208 pub snapshot_r_blocks_count: u64,
1209 pub snapshot_list: u32,
1210 pub error_count: u32,
1211 pub first_error_time: u32,
1212 pub first_error_ino: u32,
1213 pub first_error_block: u64,
1214 pub first_error_func: [u8; 32usize],
1215 pub first_error_line: u32,
1216 pub last_error_time: u32,
1217 pub last_error_ino: u32,
1218 pub last_error_line: u32,
1219 pub last_error_block: u64,
1220 pub last_error_func: [u8; 32usize],
1221 pub mount_opts: [u8; 64usize],
1222 pub usr_quota_inum: u32,
1223 pub grp_quota_inum: u32,
1224 pub overhead_clusters: u32,
1225 pub backup_bgs: [u32; 2usize],
1226 pub encrypt_algos: [u8; 4usize],
1227 pub encrypt_pw_salt: [u8; 16usize],
1228 pub lpf_ino: u32,
1229 pub padding: [u32; 100usize],
1230 pub checksum: u32,
1231}
1232#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1233const _: () = {
1234 ["Size of ext4_sblock"][::std::mem::size_of::<ext4_sblock>() - 1024usize];
1235 ["Alignment of ext4_sblock"][::std::mem::align_of::<ext4_sblock>() - 1usize];
1236 ["Offset of field: ext4_sblock::inodes_count"]
1237 [::std::mem::offset_of!(ext4_sblock, inodes_count) - 0usize];
1238 ["Offset of field: ext4_sblock::blocks_count_lo"]
1239 [::std::mem::offset_of!(ext4_sblock, blocks_count_lo) - 4usize];
1240 ["Offset of field: ext4_sblock::reserved_blocks_count_lo"]
1241 [::std::mem::offset_of!(ext4_sblock, reserved_blocks_count_lo) - 8usize];
1242 ["Offset of field: ext4_sblock::free_blocks_count_lo"]
1243 [::std::mem::offset_of!(ext4_sblock, free_blocks_count_lo) - 12usize];
1244 ["Offset of field: ext4_sblock::free_inodes_count"]
1245 [::std::mem::offset_of!(ext4_sblock, free_inodes_count) - 16usize];
1246 ["Offset of field: ext4_sblock::first_data_block"]
1247 [::std::mem::offset_of!(ext4_sblock, first_data_block) - 20usize];
1248 ["Offset of field: ext4_sblock::log_block_size"]
1249 [::std::mem::offset_of!(ext4_sblock, log_block_size) - 24usize];
1250 ["Offset of field: ext4_sblock::log_cluster_size"]
1251 [::std::mem::offset_of!(ext4_sblock, log_cluster_size) - 28usize];
1252 ["Offset of field: ext4_sblock::blocks_per_group"]
1253 [::std::mem::offset_of!(ext4_sblock, blocks_per_group) - 32usize];
1254 ["Offset of field: ext4_sblock::frags_per_group"]
1255 [::std::mem::offset_of!(ext4_sblock, frags_per_group) - 36usize];
1256 ["Offset of field: ext4_sblock::inodes_per_group"]
1257 [::std::mem::offset_of!(ext4_sblock, inodes_per_group) - 40usize];
1258 ["Offset of field: ext4_sblock::mount_time"]
1259 [::std::mem::offset_of!(ext4_sblock, mount_time) - 44usize];
1260 ["Offset of field: ext4_sblock::write_time"]
1261 [::std::mem::offset_of!(ext4_sblock, write_time) - 48usize];
1262 ["Offset of field: ext4_sblock::mount_count"]
1263 [::std::mem::offset_of!(ext4_sblock, mount_count) - 52usize];
1264 ["Offset of field: ext4_sblock::max_mount_count"]
1265 [::std::mem::offset_of!(ext4_sblock, max_mount_count) - 54usize];
1266 ["Offset of field: ext4_sblock::magic"][::std::mem::offset_of!(ext4_sblock, magic) - 56usize];
1267 ["Offset of field: ext4_sblock::state"][::std::mem::offset_of!(ext4_sblock, state) - 58usize];
1268 ["Offset of field: ext4_sblock::errors"][::std::mem::offset_of!(ext4_sblock, errors) - 60usize];
1269 ["Offset of field: ext4_sblock::minor_rev_level"]
1270 [::std::mem::offset_of!(ext4_sblock, minor_rev_level) - 62usize];
1271 ["Offset of field: ext4_sblock::last_check_time"]
1272 [::std::mem::offset_of!(ext4_sblock, last_check_time) - 64usize];
1273 ["Offset of field: ext4_sblock::check_interval"]
1274 [::std::mem::offset_of!(ext4_sblock, check_interval) - 68usize];
1275 ["Offset of field: ext4_sblock::creator_os"]
1276 [::std::mem::offset_of!(ext4_sblock, creator_os) - 72usize];
1277 ["Offset of field: ext4_sblock::rev_level"]
1278 [::std::mem::offset_of!(ext4_sblock, rev_level) - 76usize];
1279 ["Offset of field: ext4_sblock::def_resuid"]
1280 [::std::mem::offset_of!(ext4_sblock, def_resuid) - 80usize];
1281 ["Offset of field: ext4_sblock::def_resgid"]
1282 [::std::mem::offset_of!(ext4_sblock, def_resgid) - 82usize];
1283 ["Offset of field: ext4_sblock::first_inode"]
1284 [::std::mem::offset_of!(ext4_sblock, first_inode) - 84usize];
1285 ["Offset of field: ext4_sblock::inode_size"]
1286 [::std::mem::offset_of!(ext4_sblock, inode_size) - 88usize];
1287 ["Offset of field: ext4_sblock::block_group_index"]
1288 [::std::mem::offset_of!(ext4_sblock, block_group_index) - 90usize];
1289 ["Offset of field: ext4_sblock::features_compatible"]
1290 [::std::mem::offset_of!(ext4_sblock, features_compatible) - 92usize];
1291 ["Offset of field: ext4_sblock::features_incompatible"]
1292 [::std::mem::offset_of!(ext4_sblock, features_incompatible) - 96usize];
1293 ["Offset of field: ext4_sblock::features_read_only"]
1294 [::std::mem::offset_of!(ext4_sblock, features_read_only) - 100usize];
1295 ["Offset of field: ext4_sblock::uuid"][::std::mem::offset_of!(ext4_sblock, uuid) - 104usize];
1296 ["Offset of field: ext4_sblock::volume_name"]
1297 [::std::mem::offset_of!(ext4_sblock, volume_name) - 120usize];
1298 ["Offset of field: ext4_sblock::last_mounted"]
1299 [::std::mem::offset_of!(ext4_sblock, last_mounted) - 136usize];
1300 ["Offset of field: ext4_sblock::algorithm_usage_bitmap"]
1301 [::std::mem::offset_of!(ext4_sblock, algorithm_usage_bitmap) - 200usize];
1302 ["Offset of field: ext4_sblock::s_prealloc_blocks"]
1303 [::std::mem::offset_of!(ext4_sblock, s_prealloc_blocks) - 204usize];
1304 ["Offset of field: ext4_sblock::s_prealloc_dir_blocks"]
1305 [::std::mem::offset_of!(ext4_sblock, s_prealloc_dir_blocks) - 205usize];
1306 ["Offset of field: ext4_sblock::s_reserved_gdt_blocks"]
1307 [::std::mem::offset_of!(ext4_sblock, s_reserved_gdt_blocks) - 206usize];
1308 ["Offset of field: ext4_sblock::journal_uuid"]
1309 [::std::mem::offset_of!(ext4_sblock, journal_uuid) - 208usize];
1310 ["Offset of field: ext4_sblock::journal_inode_number"]
1311 [::std::mem::offset_of!(ext4_sblock, journal_inode_number) - 224usize];
1312 ["Offset of field: ext4_sblock::journal_dev"]
1313 [::std::mem::offset_of!(ext4_sblock, journal_dev) - 228usize];
1314 ["Offset of field: ext4_sblock::last_orphan"]
1315 [::std::mem::offset_of!(ext4_sblock, last_orphan) - 232usize];
1316 ["Offset of field: ext4_sblock::hash_seed"]
1317 [::std::mem::offset_of!(ext4_sblock, hash_seed) - 236usize];
1318 ["Offset of field: ext4_sblock::default_hash_version"]
1319 [::std::mem::offset_of!(ext4_sblock, default_hash_version) - 252usize];
1320 ["Offset of field: ext4_sblock::journal_backup_type"]
1321 [::std::mem::offset_of!(ext4_sblock, journal_backup_type) - 253usize];
1322 ["Offset of field: ext4_sblock::desc_size"]
1323 [::std::mem::offset_of!(ext4_sblock, desc_size) - 254usize];
1324 ["Offset of field: ext4_sblock::default_mount_opts"]
1325 [::std::mem::offset_of!(ext4_sblock, default_mount_opts) - 256usize];
1326 ["Offset of field: ext4_sblock::first_meta_bg"]
1327 [::std::mem::offset_of!(ext4_sblock, first_meta_bg) - 260usize];
1328 ["Offset of field: ext4_sblock::mkfs_time"]
1329 [::std::mem::offset_of!(ext4_sblock, mkfs_time) - 264usize];
1330 ["Offset of field: ext4_sblock::journal_blocks"]
1331 [::std::mem::offset_of!(ext4_sblock, journal_blocks) - 268usize];
1332 ["Offset of field: ext4_sblock::blocks_count_hi"]
1333 [::std::mem::offset_of!(ext4_sblock, blocks_count_hi) - 336usize];
1334 ["Offset of field: ext4_sblock::reserved_blocks_count_hi"]
1335 [::std::mem::offset_of!(ext4_sblock, reserved_blocks_count_hi) - 340usize];
1336 ["Offset of field: ext4_sblock::free_blocks_count_hi"]
1337 [::std::mem::offset_of!(ext4_sblock, free_blocks_count_hi) - 344usize];
1338 ["Offset of field: ext4_sblock::min_extra_isize"]
1339 [::std::mem::offset_of!(ext4_sblock, min_extra_isize) - 348usize];
1340 ["Offset of field: ext4_sblock::want_extra_isize"]
1341 [::std::mem::offset_of!(ext4_sblock, want_extra_isize) - 350usize];
1342 ["Offset of field: ext4_sblock::flags"][::std::mem::offset_of!(ext4_sblock, flags) - 352usize];
1343 ["Offset of field: ext4_sblock::raid_stride"]
1344 [::std::mem::offset_of!(ext4_sblock, raid_stride) - 356usize];
1345 ["Offset of field: ext4_sblock::mmp_interval"]
1346 [::std::mem::offset_of!(ext4_sblock, mmp_interval) - 358usize];
1347 ["Offset of field: ext4_sblock::mmp_block"]
1348 [::std::mem::offset_of!(ext4_sblock, mmp_block) - 360usize];
1349 ["Offset of field: ext4_sblock::raid_stripe_width"]
1350 [::std::mem::offset_of!(ext4_sblock, raid_stripe_width) - 368usize];
1351 ["Offset of field: ext4_sblock::log_groups_per_flex"]
1352 [::std::mem::offset_of!(ext4_sblock, log_groups_per_flex) - 372usize];
1353 ["Offset of field: ext4_sblock::checksum_type"]
1354 [::std::mem::offset_of!(ext4_sblock, checksum_type) - 373usize];
1355 ["Offset of field: ext4_sblock::reserved_pad"]
1356 [::std::mem::offset_of!(ext4_sblock, reserved_pad) - 374usize];
1357 ["Offset of field: ext4_sblock::kbytes_written"]
1358 [::std::mem::offset_of!(ext4_sblock, kbytes_written) - 376usize];
1359 ["Offset of field: ext4_sblock::snapshot_inum"]
1360 [::std::mem::offset_of!(ext4_sblock, snapshot_inum) - 384usize];
1361 ["Offset of field: ext4_sblock::snapshot_id"]
1362 [::std::mem::offset_of!(ext4_sblock, snapshot_id) - 388usize];
1363 ["Offset of field: ext4_sblock::snapshot_r_blocks_count"]
1364 [::std::mem::offset_of!(ext4_sblock, snapshot_r_blocks_count) - 392usize];
1365 ["Offset of field: ext4_sblock::snapshot_list"]
1366 [::std::mem::offset_of!(ext4_sblock, snapshot_list) - 400usize];
1367 ["Offset of field: ext4_sblock::error_count"]
1368 [::std::mem::offset_of!(ext4_sblock, error_count) - 404usize];
1369 ["Offset of field: ext4_sblock::first_error_time"]
1370 [::std::mem::offset_of!(ext4_sblock, first_error_time) - 408usize];
1371 ["Offset of field: ext4_sblock::first_error_ino"]
1372 [::std::mem::offset_of!(ext4_sblock, first_error_ino) - 412usize];
1373 ["Offset of field: ext4_sblock::first_error_block"]
1374 [::std::mem::offset_of!(ext4_sblock, first_error_block) - 416usize];
1375 ["Offset of field: ext4_sblock::first_error_func"]
1376 [::std::mem::offset_of!(ext4_sblock, first_error_func) - 424usize];
1377 ["Offset of field: ext4_sblock::first_error_line"]
1378 [::std::mem::offset_of!(ext4_sblock, first_error_line) - 456usize];
1379 ["Offset of field: ext4_sblock::last_error_time"]
1380 [::std::mem::offset_of!(ext4_sblock, last_error_time) - 460usize];
1381 ["Offset of field: ext4_sblock::last_error_ino"]
1382 [::std::mem::offset_of!(ext4_sblock, last_error_ino) - 464usize];
1383 ["Offset of field: ext4_sblock::last_error_line"]
1384 [::std::mem::offset_of!(ext4_sblock, last_error_line) - 468usize];
1385 ["Offset of field: ext4_sblock::last_error_block"]
1386 [::std::mem::offset_of!(ext4_sblock, last_error_block) - 472usize];
1387 ["Offset of field: ext4_sblock::last_error_func"]
1388 [::std::mem::offset_of!(ext4_sblock, last_error_func) - 480usize];
1389 ["Offset of field: ext4_sblock::mount_opts"]
1390 [::std::mem::offset_of!(ext4_sblock, mount_opts) - 512usize];
1391 ["Offset of field: ext4_sblock::usr_quota_inum"]
1392 [::std::mem::offset_of!(ext4_sblock, usr_quota_inum) - 576usize];
1393 ["Offset of field: ext4_sblock::grp_quota_inum"]
1394 [::std::mem::offset_of!(ext4_sblock, grp_quota_inum) - 580usize];
1395 ["Offset of field: ext4_sblock::overhead_clusters"]
1396 [::std::mem::offset_of!(ext4_sblock, overhead_clusters) - 584usize];
1397 ["Offset of field: ext4_sblock::backup_bgs"]
1398 [::std::mem::offset_of!(ext4_sblock, backup_bgs) - 588usize];
1399 ["Offset of field: ext4_sblock::encrypt_algos"]
1400 [::std::mem::offset_of!(ext4_sblock, encrypt_algos) - 596usize];
1401 ["Offset of field: ext4_sblock::encrypt_pw_salt"]
1402 [::std::mem::offset_of!(ext4_sblock, encrypt_pw_salt) - 600usize];
1403 ["Offset of field: ext4_sblock::lpf_ino"]
1404 [::std::mem::offset_of!(ext4_sblock, lpf_ino) - 616usize];
1405 ["Offset of field: ext4_sblock::padding"]
1406 [::std::mem::offset_of!(ext4_sblock, padding) - 620usize];
1407 ["Offset of field: ext4_sblock::checksum"]
1408 [::std::mem::offset_of!(ext4_sblock, checksum) - 1020usize];
1409};
1410#[repr(C)]
1411#[derive(Debug, Copy, Clone)]
1412pub struct ext4_bgroup {
1413 pub block_bitmap_lo: u32,
1414 pub inode_bitmap_lo: u32,
1415 pub inode_table_first_block_lo: u32,
1416 pub free_blocks_count_lo: u16,
1417 pub free_inodes_count_lo: u16,
1418 pub used_dirs_count_lo: u16,
1419 pub flags: u16,
1420 pub exclude_bitmap_lo: u32,
1421 pub block_bitmap_csum_lo: u16,
1422 pub inode_bitmap_csum_lo: u16,
1423 pub itable_unused_lo: u16,
1424 pub checksum: u16,
1425 pub block_bitmap_hi: u32,
1426 pub inode_bitmap_hi: u32,
1427 pub inode_table_first_block_hi: u32,
1428 pub free_blocks_count_hi: u16,
1429 pub free_inodes_count_hi: u16,
1430 pub used_dirs_count_hi: u16,
1431 pub itable_unused_hi: u16,
1432 pub exclude_bitmap_hi: u32,
1433 pub block_bitmap_csum_hi: u16,
1434 pub inode_bitmap_csum_hi: u16,
1435 pub reserved: u32,
1436}
1437#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1438const _: () = {
1439 ["Size of ext4_bgroup"][::std::mem::size_of::<ext4_bgroup>() - 64usize];
1440 ["Alignment of ext4_bgroup"][::std::mem::align_of::<ext4_bgroup>() - 4usize];
1441 ["Offset of field: ext4_bgroup::block_bitmap_lo"]
1442 [::std::mem::offset_of!(ext4_bgroup, block_bitmap_lo) - 0usize];
1443 ["Offset of field: ext4_bgroup::inode_bitmap_lo"]
1444 [::std::mem::offset_of!(ext4_bgroup, inode_bitmap_lo) - 4usize];
1445 ["Offset of field: ext4_bgroup::inode_table_first_block_lo"]
1446 [::std::mem::offset_of!(ext4_bgroup, inode_table_first_block_lo) - 8usize];
1447 ["Offset of field: ext4_bgroup::free_blocks_count_lo"]
1448 [::std::mem::offset_of!(ext4_bgroup, free_blocks_count_lo) - 12usize];
1449 ["Offset of field: ext4_bgroup::free_inodes_count_lo"]
1450 [::std::mem::offset_of!(ext4_bgroup, free_inodes_count_lo) - 14usize];
1451 ["Offset of field: ext4_bgroup::used_dirs_count_lo"]
1452 [::std::mem::offset_of!(ext4_bgroup, used_dirs_count_lo) - 16usize];
1453 ["Offset of field: ext4_bgroup::flags"][::std::mem::offset_of!(ext4_bgroup, flags) - 18usize];
1454 ["Offset of field: ext4_bgroup::exclude_bitmap_lo"]
1455 [::std::mem::offset_of!(ext4_bgroup, exclude_bitmap_lo) - 20usize];
1456 ["Offset of field: ext4_bgroup::block_bitmap_csum_lo"]
1457 [::std::mem::offset_of!(ext4_bgroup, block_bitmap_csum_lo) - 24usize];
1458 ["Offset of field: ext4_bgroup::inode_bitmap_csum_lo"]
1459 [::std::mem::offset_of!(ext4_bgroup, inode_bitmap_csum_lo) - 26usize];
1460 ["Offset of field: ext4_bgroup::itable_unused_lo"]
1461 [::std::mem::offset_of!(ext4_bgroup, itable_unused_lo) - 28usize];
1462 ["Offset of field: ext4_bgroup::checksum"]
1463 [::std::mem::offset_of!(ext4_bgroup, checksum) - 30usize];
1464 ["Offset of field: ext4_bgroup::block_bitmap_hi"]
1465 [::std::mem::offset_of!(ext4_bgroup, block_bitmap_hi) - 32usize];
1466 ["Offset of field: ext4_bgroup::inode_bitmap_hi"]
1467 [::std::mem::offset_of!(ext4_bgroup, inode_bitmap_hi) - 36usize];
1468 ["Offset of field: ext4_bgroup::inode_table_first_block_hi"]
1469 [::std::mem::offset_of!(ext4_bgroup, inode_table_first_block_hi) - 40usize];
1470 ["Offset of field: ext4_bgroup::free_blocks_count_hi"]
1471 [::std::mem::offset_of!(ext4_bgroup, free_blocks_count_hi) - 44usize];
1472 ["Offset of field: ext4_bgroup::free_inodes_count_hi"]
1473 [::std::mem::offset_of!(ext4_bgroup, free_inodes_count_hi) - 46usize];
1474 ["Offset of field: ext4_bgroup::used_dirs_count_hi"]
1475 [::std::mem::offset_of!(ext4_bgroup, used_dirs_count_hi) - 48usize];
1476 ["Offset of field: ext4_bgroup::itable_unused_hi"]
1477 [::std::mem::offset_of!(ext4_bgroup, itable_unused_hi) - 50usize];
1478 ["Offset of field: ext4_bgroup::exclude_bitmap_hi"]
1479 [::std::mem::offset_of!(ext4_bgroup, exclude_bitmap_hi) - 52usize];
1480 ["Offset of field: ext4_bgroup::block_bitmap_csum_hi"]
1481 [::std::mem::offset_of!(ext4_bgroup, block_bitmap_csum_hi) - 56usize];
1482 ["Offset of field: ext4_bgroup::inode_bitmap_csum_hi"]
1483 [::std::mem::offset_of!(ext4_bgroup, inode_bitmap_csum_hi) - 58usize];
1484 ["Offset of field: ext4_bgroup::reserved"]
1485 [::std::mem::offset_of!(ext4_bgroup, reserved) - 60usize];
1486};
1487#[repr(C, packed)]
1488#[derive(Copy, Clone)]
1489pub struct ext4_inode {
1490 pub mode: u16,
1491 pub uid: u16,
1492 pub size_lo: u32,
1493 pub access_time: u32,
1494 pub change_inode_time: u32,
1495 pub modification_time: u32,
1496 pub deletion_time: u32,
1497 pub gid: u16,
1498 pub links_count: u16,
1499 pub blocks_count_lo: u32,
1500 pub flags: u32,
1501 pub unused_osd1: u32,
1502 pub blocks: [u32; 15usize],
1503 pub generation: u32,
1504 pub file_acl_lo: u32,
1505 pub size_hi: u32,
1506 pub obso_faddr: u32,
1507 pub osd2: ext4_inode__bindgen_ty_1,
1508 pub extra_isize: u16,
1509 pub checksum_hi: u16,
1510 pub ctime_extra: u32,
1511 pub mtime_extra: u32,
1512 pub atime_extra: u32,
1513 pub crtime: u32,
1514 pub crtime_extra: u32,
1515 pub version_hi: u32,
1516}
1517#[repr(C)]
1518#[derive(Copy, Clone)]
1519pub union ext4_inode__bindgen_ty_1 {
1520 pub linux2: ext4_inode__bindgen_ty_1__bindgen_ty_1,
1521 pub hurd2: ext4_inode__bindgen_ty_1__bindgen_ty_2,
1522}
1523#[repr(C, packed)]
1524#[derive(Debug, Copy, Clone)]
1525pub struct ext4_inode__bindgen_ty_1__bindgen_ty_1 {
1526 pub blocks_high: u16,
1527 pub file_acl_high: u16,
1528 pub uid_high: u16,
1529 pub gid_high: u16,
1530 pub checksum_lo: u16,
1531 pub reserved2: u16,
1532}
1533#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1534const _: () = {
1535 ["Size of ext4_inode__bindgen_ty_1__bindgen_ty_1"]
1536 [::std::mem::size_of::<ext4_inode__bindgen_ty_1__bindgen_ty_1>() - 12usize];
1537 ["Alignment of ext4_inode__bindgen_ty_1__bindgen_ty_1"]
1538 [::std::mem::align_of::<ext4_inode__bindgen_ty_1__bindgen_ty_1>() - 1usize];
1539 ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_1::blocks_high"]
1540 [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_1, blocks_high) - 0usize];
1541 ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_1::file_acl_high"]
1542 [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_1, file_acl_high) - 2usize];
1543 ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_1::uid_high"]
1544 [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_1, uid_high) - 4usize];
1545 ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_1::gid_high"]
1546 [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_1, gid_high) - 6usize];
1547 ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_1::checksum_lo"]
1548 [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_1, checksum_lo) - 8usize];
1549 ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_1::reserved2"]
1550 [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_1, reserved2) - 10usize];
1551};
1552#[repr(C, packed)]
1553#[derive(Debug, Copy, Clone)]
1554pub struct ext4_inode__bindgen_ty_1__bindgen_ty_2 {
1555 pub reserved1: u16,
1556 pub mode_high: u16,
1557 pub uid_high: u16,
1558 pub gid_high: u16,
1559 pub author: u32,
1560}
1561#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1562const _: () = {
1563 ["Size of ext4_inode__bindgen_ty_1__bindgen_ty_2"]
1564 [::std::mem::size_of::<ext4_inode__bindgen_ty_1__bindgen_ty_2>() - 12usize];
1565 ["Alignment of ext4_inode__bindgen_ty_1__bindgen_ty_2"]
1566 [::std::mem::align_of::<ext4_inode__bindgen_ty_1__bindgen_ty_2>() - 1usize];
1567 ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_2::reserved1"]
1568 [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_2, reserved1) - 0usize];
1569 ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_2::mode_high"]
1570 [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_2, mode_high) - 2usize];
1571 ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_2::uid_high"]
1572 [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_2, uid_high) - 4usize];
1573 ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_2::gid_high"]
1574 [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_2, gid_high) - 6usize];
1575 ["Offset of field: ext4_inode__bindgen_ty_1__bindgen_ty_2::author"]
1576 [::std::mem::offset_of!(ext4_inode__bindgen_ty_1__bindgen_ty_2, author) - 8usize];
1577};
1578#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1579const _: () = {
1580 ["Size of ext4_inode__bindgen_ty_1"]
1581 [::std::mem::size_of::<ext4_inode__bindgen_ty_1>() - 12usize];
1582 ["Alignment of ext4_inode__bindgen_ty_1"]
1583 [::std::mem::align_of::<ext4_inode__bindgen_ty_1>() - 1usize];
1584 ["Offset of field: ext4_inode__bindgen_ty_1::linux2"]
1585 [::std::mem::offset_of!(ext4_inode__bindgen_ty_1, linux2) - 0usize];
1586 ["Offset of field: ext4_inode__bindgen_ty_1::hurd2"]
1587 [::std::mem::offset_of!(ext4_inode__bindgen_ty_1, hurd2) - 0usize];
1588};
1589#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1590const _: () = {
1591 ["Size of ext4_inode"][::std::mem::size_of::<ext4_inode>() - 156usize];
1592 ["Alignment of ext4_inode"][::std::mem::align_of::<ext4_inode>() - 1usize];
1593 ["Offset of field: ext4_inode::mode"][::std::mem::offset_of!(ext4_inode, mode) - 0usize];
1594 ["Offset of field: ext4_inode::uid"][::std::mem::offset_of!(ext4_inode, uid) - 2usize];
1595 ["Offset of field: ext4_inode::size_lo"][::std::mem::offset_of!(ext4_inode, size_lo) - 4usize];
1596 ["Offset of field: ext4_inode::access_time"]
1597 [::std::mem::offset_of!(ext4_inode, access_time) - 8usize];
1598 ["Offset of field: ext4_inode::change_inode_time"]
1599 [::std::mem::offset_of!(ext4_inode, change_inode_time) - 12usize];
1600 ["Offset of field: ext4_inode::modification_time"]
1601 [::std::mem::offset_of!(ext4_inode, modification_time) - 16usize];
1602 ["Offset of field: ext4_inode::deletion_time"]
1603 [::std::mem::offset_of!(ext4_inode, deletion_time) - 20usize];
1604 ["Offset of field: ext4_inode::gid"][::std::mem::offset_of!(ext4_inode, gid) - 24usize];
1605 ["Offset of field: ext4_inode::links_count"]
1606 [::std::mem::offset_of!(ext4_inode, links_count) - 26usize];
1607 ["Offset of field: ext4_inode::blocks_count_lo"]
1608 [::std::mem::offset_of!(ext4_inode, blocks_count_lo) - 28usize];
1609 ["Offset of field: ext4_inode::flags"][::std::mem::offset_of!(ext4_inode, flags) - 32usize];
1610 ["Offset of field: ext4_inode::unused_osd1"]
1611 [::std::mem::offset_of!(ext4_inode, unused_osd1) - 36usize];
1612 ["Offset of field: ext4_inode::blocks"][::std::mem::offset_of!(ext4_inode, blocks) - 40usize];
1613 ["Offset of field: ext4_inode::generation"]
1614 [::std::mem::offset_of!(ext4_inode, generation) - 100usize];
1615 ["Offset of field: ext4_inode::file_acl_lo"]
1616 [::std::mem::offset_of!(ext4_inode, file_acl_lo) - 104usize];
1617 ["Offset of field: ext4_inode::size_hi"]
1618 [::std::mem::offset_of!(ext4_inode, size_hi) - 108usize];
1619 ["Offset of field: ext4_inode::obso_faddr"]
1620 [::std::mem::offset_of!(ext4_inode, obso_faddr) - 112usize];
1621 ["Offset of field: ext4_inode::osd2"][::std::mem::offset_of!(ext4_inode, osd2) - 116usize];
1622 ["Offset of field: ext4_inode::extra_isize"]
1623 [::std::mem::offset_of!(ext4_inode, extra_isize) - 128usize];
1624 ["Offset of field: ext4_inode::checksum_hi"]
1625 [::std::mem::offset_of!(ext4_inode, checksum_hi) - 130usize];
1626 ["Offset of field: ext4_inode::ctime_extra"]
1627 [::std::mem::offset_of!(ext4_inode, ctime_extra) - 132usize];
1628 ["Offset of field: ext4_inode::mtime_extra"]
1629 [::std::mem::offset_of!(ext4_inode, mtime_extra) - 136usize];
1630 ["Offset of field: ext4_inode::atime_extra"]
1631 [::std::mem::offset_of!(ext4_inode, atime_extra) - 140usize];
1632 ["Offset of field: ext4_inode::crtime"][::std::mem::offset_of!(ext4_inode, crtime) - 144usize];
1633 ["Offset of field: ext4_inode::crtime_extra"]
1634 [::std::mem::offset_of!(ext4_inode, crtime_extra) - 148usize];
1635 ["Offset of field: ext4_inode::version_hi"]
1636 [::std::mem::offset_of!(ext4_inode, version_hi) - 152usize];
1637};
1638pub const EXT4_DE_UNKNOWN: _bindgen_ty_1 = 0;
1639pub const EXT4_DE_REG_FILE: _bindgen_ty_1 = 1;
1640pub const EXT4_DE_DIR: _bindgen_ty_1 = 2;
1641pub const EXT4_DE_CHRDEV: _bindgen_ty_1 = 3;
1642pub const EXT4_DE_BLKDEV: _bindgen_ty_1 = 4;
1643pub const EXT4_DE_FIFO: _bindgen_ty_1 = 5;
1644pub const EXT4_DE_SOCK: _bindgen_ty_1 = 6;
1645pub const EXT4_DE_SYMLINK: _bindgen_ty_1 = 7;
1646#[doc = "@brief Directory entry types."]
1647pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
1648#[repr(C)]
1649#[derive(Copy, Clone)]
1650pub union ext4_dir_en_internal {
1651 pub name_length_high: u8,
1652 pub inode_type: u8,
1653}
1654#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1655const _: () = {
1656 ["Size of ext4_dir_en_internal"][::std::mem::size_of::<ext4_dir_en_internal>() - 1usize];
1657 ["Alignment of ext4_dir_en_internal"][::std::mem::align_of::<ext4_dir_en_internal>() - 1usize];
1658 ["Offset of field: ext4_dir_en_internal::name_length_high"]
1659 [::std::mem::offset_of!(ext4_dir_en_internal, name_length_high) - 0usize];
1660 ["Offset of field: ext4_dir_en_internal::inode_type"]
1661 [::std::mem::offset_of!(ext4_dir_en_internal, inode_type) - 0usize];
1662};
1663#[doc = " Linked list directory entry structure"]
1664#[repr(C, packed)]
1665pub struct ext4_dir_en {
1666 pub inode: u32,
1667 pub entry_len: u16,
1668 pub name_len: u8,
1669 pub in_: ext4_dir_en_internal,
1670 pub name: __IncompleteArrayField<u8>,
1671}
1672#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1673const _: () = {
1674 ["Size of ext4_dir_en"][::std::mem::size_of::<ext4_dir_en>() - 8usize];
1675 ["Alignment of ext4_dir_en"][::std::mem::align_of::<ext4_dir_en>() - 1usize];
1676 ["Offset of field: ext4_dir_en::inode"][::std::mem::offset_of!(ext4_dir_en, inode) - 0usize];
1677 ["Offset of field: ext4_dir_en::entry_len"]
1678 [::std::mem::offset_of!(ext4_dir_en, entry_len) - 4usize];
1679 ["Offset of field: ext4_dir_en::name_len"]
1680 [::std::mem::offset_of!(ext4_dir_en, name_len) - 6usize];
1681 ["Offset of field: ext4_dir_en::in_"][::std::mem::offset_of!(ext4_dir_en, in_) - 7usize];
1682 ["Offset of field: ext4_dir_en::name"][::std::mem::offset_of!(ext4_dir_en, name) - 8usize];
1683};
1684#[repr(C, packed)]
1685#[derive(Debug, Copy, Clone)]
1686pub struct ext4_dir_idx_climit {
1687 pub limit: u16,
1688 pub count: u16,
1689}
1690#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1691const _: () = {
1692 ["Size of ext4_dir_idx_climit"][::std::mem::size_of::<ext4_dir_idx_climit>() - 4usize];
1693 ["Alignment of ext4_dir_idx_climit"][::std::mem::align_of::<ext4_dir_idx_climit>() - 1usize];
1694 ["Offset of field: ext4_dir_idx_climit::limit"]
1695 [::std::mem::offset_of!(ext4_dir_idx_climit, limit) - 0usize];
1696 ["Offset of field: ext4_dir_idx_climit::count"]
1697 [::std::mem::offset_of!(ext4_dir_idx_climit, count) - 2usize];
1698};
1699#[repr(C, packed)]
1700#[derive(Debug, Copy, Clone)]
1701pub struct ext4_dir_idx_dot_en {
1702 pub inode: u32,
1703 pub entry_length: u16,
1704 pub name_length: u8,
1705 pub inode_type: u8,
1706 pub name: [u8; 4usize],
1707}
1708#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1709const _: () = {
1710 ["Size of ext4_dir_idx_dot_en"][::std::mem::size_of::<ext4_dir_idx_dot_en>() - 12usize];
1711 ["Alignment of ext4_dir_idx_dot_en"][::std::mem::align_of::<ext4_dir_idx_dot_en>() - 1usize];
1712 ["Offset of field: ext4_dir_idx_dot_en::inode"]
1713 [::std::mem::offset_of!(ext4_dir_idx_dot_en, inode) - 0usize];
1714 ["Offset of field: ext4_dir_idx_dot_en::entry_length"]
1715 [::std::mem::offset_of!(ext4_dir_idx_dot_en, entry_length) - 4usize];
1716 ["Offset of field: ext4_dir_idx_dot_en::name_length"]
1717 [::std::mem::offset_of!(ext4_dir_idx_dot_en, name_length) - 6usize];
1718 ["Offset of field: ext4_dir_idx_dot_en::inode_type"]
1719 [::std::mem::offset_of!(ext4_dir_idx_dot_en, inode_type) - 7usize];
1720 ["Offset of field: ext4_dir_idx_dot_en::name"]
1721 [::std::mem::offset_of!(ext4_dir_idx_dot_en, name) - 8usize];
1722};
1723#[repr(C, packed)]
1724#[derive(Debug, Copy, Clone)]
1725pub struct ext4_dir_idx_rinfo {
1726 pub reserved_zero: u32,
1727 pub hash_version: u8,
1728 pub info_length: u8,
1729 pub indirect_levels: u8,
1730 pub unused_flags: u8,
1731}
1732#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1733const _: () = {
1734 ["Size of ext4_dir_idx_rinfo"][::std::mem::size_of::<ext4_dir_idx_rinfo>() - 8usize];
1735 ["Alignment of ext4_dir_idx_rinfo"][::std::mem::align_of::<ext4_dir_idx_rinfo>() - 1usize];
1736 ["Offset of field: ext4_dir_idx_rinfo::reserved_zero"]
1737 [::std::mem::offset_of!(ext4_dir_idx_rinfo, reserved_zero) - 0usize];
1738 ["Offset of field: ext4_dir_idx_rinfo::hash_version"]
1739 [::std::mem::offset_of!(ext4_dir_idx_rinfo, hash_version) - 4usize];
1740 ["Offset of field: ext4_dir_idx_rinfo::info_length"]
1741 [::std::mem::offset_of!(ext4_dir_idx_rinfo, info_length) - 5usize];
1742 ["Offset of field: ext4_dir_idx_rinfo::indirect_levels"]
1743 [::std::mem::offset_of!(ext4_dir_idx_rinfo, indirect_levels) - 6usize];
1744 ["Offset of field: ext4_dir_idx_rinfo::unused_flags"]
1745 [::std::mem::offset_of!(ext4_dir_idx_rinfo, unused_flags) - 7usize];
1746};
1747#[repr(C, packed)]
1748#[derive(Debug, Copy, Clone)]
1749pub struct ext4_dir_idx_entry {
1750 pub hash: u32,
1751 pub block: u32,
1752}
1753#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1754const _: () = {
1755 ["Size of ext4_dir_idx_entry"][::std::mem::size_of::<ext4_dir_idx_entry>() - 8usize];
1756 ["Alignment of ext4_dir_idx_entry"][::std::mem::align_of::<ext4_dir_idx_entry>() - 1usize];
1757 ["Offset of field: ext4_dir_idx_entry::hash"]
1758 [::std::mem::offset_of!(ext4_dir_idx_entry, hash) - 0usize];
1759 ["Offset of field: ext4_dir_idx_entry::block"]
1760 [::std::mem::offset_of!(ext4_dir_idx_entry, block) - 4usize];
1761};
1762#[repr(C)]
1763#[derive(Debug)]
1764pub struct ext4_dir_idx_root {
1765 pub dots: [ext4_dir_idx_dot_en; 2usize],
1766 pub info: ext4_dir_idx_rinfo,
1767 pub en: __IncompleteArrayField<ext4_dir_idx_entry>,
1768}
1769#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1770const _: () = {
1771 ["Size of ext4_dir_idx_root"][::std::mem::size_of::<ext4_dir_idx_root>() - 32usize];
1772 ["Alignment of ext4_dir_idx_root"][::std::mem::align_of::<ext4_dir_idx_root>() - 1usize];
1773 ["Offset of field: ext4_dir_idx_root::dots"]
1774 [::std::mem::offset_of!(ext4_dir_idx_root, dots) - 0usize];
1775 ["Offset of field: ext4_dir_idx_root::info"]
1776 [::std::mem::offset_of!(ext4_dir_idx_root, info) - 24usize];
1777 ["Offset of field: ext4_dir_idx_root::en"]
1778 [::std::mem::offset_of!(ext4_dir_idx_root, en) - 32usize];
1779};
1780#[repr(C, packed)]
1781#[derive(Debug, Copy, Clone)]
1782pub struct ext4_fake_dir_entry {
1783 pub inode: u32,
1784 pub entry_length: u16,
1785 pub name_length: u8,
1786 pub inode_type: u8,
1787}
1788#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1789const _: () = {
1790 ["Size of ext4_fake_dir_entry"][::std::mem::size_of::<ext4_fake_dir_entry>() - 8usize];
1791 ["Alignment of ext4_fake_dir_entry"][::std::mem::align_of::<ext4_fake_dir_entry>() - 1usize];
1792 ["Offset of field: ext4_fake_dir_entry::inode"]
1793 [::std::mem::offset_of!(ext4_fake_dir_entry, inode) - 0usize];
1794 ["Offset of field: ext4_fake_dir_entry::entry_length"]
1795 [::std::mem::offset_of!(ext4_fake_dir_entry, entry_length) - 4usize];
1796 ["Offset of field: ext4_fake_dir_entry::name_length"]
1797 [::std::mem::offset_of!(ext4_fake_dir_entry, name_length) - 6usize];
1798 ["Offset of field: ext4_fake_dir_entry::inode_type"]
1799 [::std::mem::offset_of!(ext4_fake_dir_entry, inode_type) - 7usize];
1800};
1801#[repr(C)]
1802#[derive(Debug)]
1803pub struct ext4_dir_idx_node {
1804 pub fake: ext4_fake_dir_entry,
1805 pub entries: __IncompleteArrayField<ext4_dir_idx_entry>,
1806}
1807#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1808const _: () = {
1809 ["Size of ext4_dir_idx_node"][::std::mem::size_of::<ext4_dir_idx_node>() - 8usize];
1810 ["Alignment of ext4_dir_idx_node"][::std::mem::align_of::<ext4_dir_idx_node>() - 1usize];
1811 ["Offset of field: ext4_dir_idx_node::fake"]
1812 [::std::mem::offset_of!(ext4_dir_idx_node, fake) - 0usize];
1813 ["Offset of field: ext4_dir_idx_node::entries"]
1814 [::std::mem::offset_of!(ext4_dir_idx_node, entries) - 8usize];
1815};
1816#[repr(C, packed)]
1817#[derive(Debug, Copy, Clone)]
1818pub struct ext4_dir_idx_tail {
1819 pub reserved: u32,
1820 pub checksum: u32,
1821}
1822#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1823const _: () = {
1824 ["Size of ext4_dir_idx_tail"][::std::mem::size_of::<ext4_dir_idx_tail>() - 8usize];
1825 ["Alignment of ext4_dir_idx_tail"][::std::mem::align_of::<ext4_dir_idx_tail>() - 1usize];
1826 ["Offset of field: ext4_dir_idx_tail::reserved"]
1827 [::std::mem::offset_of!(ext4_dir_idx_tail, reserved) - 0usize];
1828 ["Offset of field: ext4_dir_idx_tail::checksum"]
1829 [::std::mem::offset_of!(ext4_dir_idx_tail, checksum) - 4usize];
1830};
1831#[repr(C, packed)]
1832#[derive(Debug, Copy, Clone)]
1833pub struct ext4_dir_entry_tail {
1834 pub reserved_zero1: u32,
1835 pub rec_len: u16,
1836 pub reserved_zero2: u8,
1837 pub reserved_ft: u8,
1838 pub checksum: u32,
1839}
1840#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1841const _: () = {
1842 ["Size of ext4_dir_entry_tail"][::std::mem::size_of::<ext4_dir_entry_tail>() - 12usize];
1843 ["Alignment of ext4_dir_entry_tail"][::std::mem::align_of::<ext4_dir_entry_tail>() - 1usize];
1844 ["Offset of field: ext4_dir_entry_tail::reserved_zero1"]
1845 [::std::mem::offset_of!(ext4_dir_entry_tail, reserved_zero1) - 0usize];
1846 ["Offset of field: ext4_dir_entry_tail::rec_len"]
1847 [::std::mem::offset_of!(ext4_dir_entry_tail, rec_len) - 4usize];
1848 ["Offset of field: ext4_dir_entry_tail::reserved_zero2"]
1849 [::std::mem::offset_of!(ext4_dir_entry_tail, reserved_zero2) - 6usize];
1850 ["Offset of field: ext4_dir_entry_tail::reserved_ft"]
1851 [::std::mem::offset_of!(ext4_dir_entry_tail, reserved_ft) - 7usize];
1852 ["Offset of field: ext4_dir_entry_tail::checksum"]
1853 [::std::mem::offset_of!(ext4_dir_entry_tail, checksum) - 8usize];
1854};
1855#[repr(C, packed)]
1856#[derive(Debug, Copy, Clone)]
1857pub struct jbd_bhdr {
1858 pub magic: u32,
1859 pub blocktype: u32,
1860 pub sequence: u32,
1861}
1862#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1863const _: () = {
1864 ["Size of jbd_bhdr"][::std::mem::size_of::<jbd_bhdr>() - 12usize];
1865 ["Alignment of jbd_bhdr"][::std::mem::align_of::<jbd_bhdr>() - 1usize];
1866 ["Offset of field: jbd_bhdr::magic"][::std::mem::offset_of!(jbd_bhdr, magic) - 0usize];
1867 ["Offset of field: jbd_bhdr::blocktype"][::std::mem::offset_of!(jbd_bhdr, blocktype) - 4usize];
1868 ["Offset of field: jbd_bhdr::sequence"][::std::mem::offset_of!(jbd_bhdr, sequence) - 8usize];
1869};
1870#[repr(C, packed)]
1871#[derive(Debug, Copy, Clone)]
1872pub struct jbd_commit_header {
1873 pub header: jbd_bhdr,
1874 pub chksum_type: u8,
1875 pub chksum_size: u8,
1876 pub padding: [u8; 2usize],
1877 pub chksum: [u32; 8usize],
1878 pub commit_sec: u64,
1879 pub commit_nsec: u32,
1880}
1881#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1882const _: () = {
1883 ["Size of jbd_commit_header"][::std::mem::size_of::<jbd_commit_header>() - 60usize];
1884 ["Alignment of jbd_commit_header"][::std::mem::align_of::<jbd_commit_header>() - 1usize];
1885 ["Offset of field: jbd_commit_header::header"]
1886 [::std::mem::offset_of!(jbd_commit_header, header) - 0usize];
1887 ["Offset of field: jbd_commit_header::chksum_type"]
1888 [::std::mem::offset_of!(jbd_commit_header, chksum_type) - 12usize];
1889 ["Offset of field: jbd_commit_header::chksum_size"]
1890 [::std::mem::offset_of!(jbd_commit_header, chksum_size) - 13usize];
1891 ["Offset of field: jbd_commit_header::padding"]
1892 [::std::mem::offset_of!(jbd_commit_header, padding) - 14usize];
1893 ["Offset of field: jbd_commit_header::chksum"]
1894 [::std::mem::offset_of!(jbd_commit_header, chksum) - 16usize];
1895 ["Offset of field: jbd_commit_header::commit_sec"]
1896 [::std::mem::offset_of!(jbd_commit_header, commit_sec) - 48usize];
1897 ["Offset of field: jbd_commit_header::commit_nsec"]
1898 [::std::mem::offset_of!(jbd_commit_header, commit_nsec) - 56usize];
1899};
1900#[repr(C, packed)]
1901#[derive(Debug, Copy, Clone)]
1902pub struct jbd_block_tag3 {
1903 pub blocknr: u32,
1904 pub flags: u32,
1905 pub blocknr_high: u32,
1906 pub checksum: u32,
1907}
1908#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1909const _: () = {
1910 ["Size of jbd_block_tag3"][::std::mem::size_of::<jbd_block_tag3>() - 16usize];
1911 ["Alignment of jbd_block_tag3"][::std::mem::align_of::<jbd_block_tag3>() - 1usize];
1912 ["Offset of field: jbd_block_tag3::blocknr"]
1913 [::std::mem::offset_of!(jbd_block_tag3, blocknr) - 0usize];
1914 ["Offset of field: jbd_block_tag3::flags"]
1915 [::std::mem::offset_of!(jbd_block_tag3, flags) - 4usize];
1916 ["Offset of field: jbd_block_tag3::blocknr_high"]
1917 [::std::mem::offset_of!(jbd_block_tag3, blocknr_high) - 8usize];
1918 ["Offset of field: jbd_block_tag3::checksum"]
1919 [::std::mem::offset_of!(jbd_block_tag3, checksum) - 12usize];
1920};
1921#[repr(C, packed)]
1922#[derive(Debug, Copy, Clone)]
1923pub struct jbd_block_tag {
1924 pub blocknr: u32,
1925 pub checksum: u16,
1926 pub flags: u16,
1927 pub blocknr_high: u32,
1928}
1929#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1930const _: () = {
1931 ["Size of jbd_block_tag"][::std::mem::size_of::<jbd_block_tag>() - 12usize];
1932 ["Alignment of jbd_block_tag"][::std::mem::align_of::<jbd_block_tag>() - 1usize];
1933 ["Offset of field: jbd_block_tag::blocknr"]
1934 [::std::mem::offset_of!(jbd_block_tag, blocknr) - 0usize];
1935 ["Offset of field: jbd_block_tag::checksum"]
1936 [::std::mem::offset_of!(jbd_block_tag, checksum) - 4usize];
1937 ["Offset of field: jbd_block_tag::flags"]
1938 [::std::mem::offset_of!(jbd_block_tag, flags) - 6usize];
1939 ["Offset of field: jbd_block_tag::blocknr_high"]
1940 [::std::mem::offset_of!(jbd_block_tag, blocknr_high) - 8usize];
1941};
1942#[repr(C, packed)]
1943#[derive(Debug, Copy, Clone)]
1944pub struct jbd_block_tail {
1945 pub checksum: u32,
1946}
1947#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1948const _: () = {
1949 ["Size of jbd_block_tail"][::std::mem::size_of::<jbd_block_tail>() - 4usize];
1950 ["Alignment of jbd_block_tail"][::std::mem::align_of::<jbd_block_tail>() - 1usize];
1951 ["Offset of field: jbd_block_tail::checksum"]
1952 [::std::mem::offset_of!(jbd_block_tail, checksum) - 0usize];
1953};
1954#[repr(C, packed)]
1955#[derive(Debug, Copy, Clone)]
1956pub struct jbd_revoke_header {
1957 pub header: jbd_bhdr,
1958 pub count: u32,
1959}
1960#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1961const _: () = {
1962 ["Size of jbd_revoke_header"][::std::mem::size_of::<jbd_revoke_header>() - 16usize];
1963 ["Alignment of jbd_revoke_header"][::std::mem::align_of::<jbd_revoke_header>() - 1usize];
1964 ["Offset of field: jbd_revoke_header::header"]
1965 [::std::mem::offset_of!(jbd_revoke_header, header) - 0usize];
1966 ["Offset of field: jbd_revoke_header::count"]
1967 [::std::mem::offset_of!(jbd_revoke_header, count) - 12usize];
1968};
1969#[repr(C, packed)]
1970#[derive(Debug, Copy, Clone)]
1971pub struct jbd_revoke_tail {
1972 pub checksum: u32,
1973}
1974#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1975const _: () = {
1976 ["Size of jbd_revoke_tail"][::std::mem::size_of::<jbd_revoke_tail>() - 4usize];
1977 ["Alignment of jbd_revoke_tail"][::std::mem::align_of::<jbd_revoke_tail>() - 1usize];
1978 ["Offset of field: jbd_revoke_tail::checksum"]
1979 [::std::mem::offset_of!(jbd_revoke_tail, checksum) - 0usize];
1980};
1981#[repr(C, packed)]
1982#[derive(Debug, Copy, Clone)]
1983pub struct jbd_sb {
1984 pub header: jbd_bhdr,
1985 pub blocksize: u32,
1986 pub maxlen: u32,
1987 pub first: u32,
1988 pub sequence: u32,
1989 pub start: u32,
1990 pub error_val: i32,
1991 pub feature_compat: u32,
1992 pub feature_incompat: u32,
1993 pub feature_ro_compat: u32,
1994 pub uuid: [u8; 16usize],
1995 pub nr_users: u32,
1996 pub dynsuper: u32,
1997 pub max_transaction: u32,
1998 pub max_trandata: u32,
1999 pub checksum_type: u8,
2000 pub padding2: [u8; 3usize],
2001 pub padding: [u32; 42usize],
2002 pub checksum: u32,
2003 pub users: [u8; 768usize],
2004}
2005#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2006const _: () = {
2007 ["Size of jbd_sb"][::std::mem::size_of::<jbd_sb>() - 1024usize];
2008 ["Alignment of jbd_sb"][::std::mem::align_of::<jbd_sb>() - 1usize];
2009 ["Offset of field: jbd_sb::header"][::std::mem::offset_of!(jbd_sb, header) - 0usize];
2010 ["Offset of field: jbd_sb::blocksize"][::std::mem::offset_of!(jbd_sb, blocksize) - 12usize];
2011 ["Offset of field: jbd_sb::maxlen"][::std::mem::offset_of!(jbd_sb, maxlen) - 16usize];
2012 ["Offset of field: jbd_sb::first"][::std::mem::offset_of!(jbd_sb, first) - 20usize];
2013 ["Offset of field: jbd_sb::sequence"][::std::mem::offset_of!(jbd_sb, sequence) - 24usize];
2014 ["Offset of field: jbd_sb::start"][::std::mem::offset_of!(jbd_sb, start) - 28usize];
2015 ["Offset of field: jbd_sb::error_val"][::std::mem::offset_of!(jbd_sb, error_val) - 32usize];
2016 ["Offset of field: jbd_sb::feature_compat"]
2017 [::std::mem::offset_of!(jbd_sb, feature_compat) - 36usize];
2018 ["Offset of field: jbd_sb::feature_incompat"]
2019 [::std::mem::offset_of!(jbd_sb, feature_incompat) - 40usize];
2020 ["Offset of field: jbd_sb::feature_ro_compat"]
2021 [::std::mem::offset_of!(jbd_sb, feature_ro_compat) - 44usize];
2022 ["Offset of field: jbd_sb::uuid"][::std::mem::offset_of!(jbd_sb, uuid) - 48usize];
2023 ["Offset of field: jbd_sb::nr_users"][::std::mem::offset_of!(jbd_sb, nr_users) - 64usize];
2024 ["Offset of field: jbd_sb::dynsuper"][::std::mem::offset_of!(jbd_sb, dynsuper) - 68usize];
2025 ["Offset of field: jbd_sb::max_transaction"]
2026 [::std::mem::offset_of!(jbd_sb, max_transaction) - 72usize];
2027 ["Offset of field: jbd_sb::max_trandata"]
2028 [::std::mem::offset_of!(jbd_sb, max_trandata) - 76usize];
2029 ["Offset of field: jbd_sb::checksum_type"]
2030 [::std::mem::offset_of!(jbd_sb, checksum_type) - 80usize];
2031 ["Offset of field: jbd_sb::padding2"][::std::mem::offset_of!(jbd_sb, padding2) - 81usize];
2032 ["Offset of field: jbd_sb::padding"][::std::mem::offset_of!(jbd_sb, padding) - 84usize];
2033 ["Offset of field: jbd_sb::checksum"][::std::mem::offset_of!(jbd_sb, checksum) - 252usize];
2034 ["Offset of field: jbd_sb::users"][::std::mem::offset_of!(jbd_sb, users) - 256usize];
2035};
2036unsafe extern "C" {
2037 pub static mut __mlibc_errno: ::std::os::raw::c_int;
2038}
2039unsafe extern "C" {
2040 pub fn __errno_location() -> *mut ::std::os::raw::c_int;
2041}
2042#[repr(C)]
2043#[derive(Debug, Copy, Clone)]
2044pub struct imaxdiv_t {
2045 pub quot: intmax_t,
2046 pub rem: intmax_t,
2047}
2048#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2049const _: () = {
2050 ["Size of imaxdiv_t"][::std::mem::size_of::<imaxdiv_t>() - 16usize];
2051 ["Alignment of imaxdiv_t"][::std::mem::align_of::<imaxdiv_t>() - 8usize];
2052 ["Offset of field: imaxdiv_t::quot"][::std::mem::offset_of!(imaxdiv_t, quot) - 0usize];
2053 ["Offset of field: imaxdiv_t::rem"][::std::mem::offset_of!(imaxdiv_t, rem) - 8usize];
2054};
2055unsafe extern "C" {
2056 pub fn imaxabs(__x: intmax_t) -> intmax_t;
2057}
2058unsafe extern "C" {
2059 pub fn imaxdiv(__x: intmax_t, __y: intmax_t) -> imaxdiv_t;
2060}
2061unsafe extern "C" {
2062 pub fn strtoimax(
2063 __string: *const ::std::os::raw::c_char,
2064 __end: *mut *mut ::std::os::raw::c_char,
2065 __base: ::std::os::raw::c_int,
2066 ) -> intmax_t;
2067}
2068unsafe extern "C" {
2069 pub fn strtoumax(
2070 __string: *const ::std::os::raw::c_char,
2071 __end: *mut *mut ::std::os::raw::c_char,
2072 __base: ::std::os::raw::c_int,
2073 ) -> uintmax_t;
2074}
2075unsafe extern "C" {
2076 pub fn wcstoimax(
2077 __string: *const wchar_t,
2078 __end: *mut *mut wchar_t,
2079 __base: ::std::os::raw::c_int,
2080 ) -> intmax_t;
2081}
2082unsafe extern "C" {
2083 pub fn wcstoumax(
2084 __string: *const wchar_t,
2085 __end: *mut *mut wchar_t,
2086 __base: ::std::os::raw::c_int,
2087 ) -> uintmax_t;
2088}
2089unsafe extern "C" {
2090 #[doc = "@brief Global mask debug set.\n @param m new debug mask."]
2091 pub fn ext4_dmask_set(m: u32);
2092}
2093unsafe extern "C" {
2094 #[doc = "@brief Global mask debug clear.\n @param m new debug mask."]
2095 pub fn ext4_dmask_clr(m: u32);
2096}
2097unsafe extern "C" {
2098 #[doc = "@brief Global debug mask get.\n @return debug mask"]
2099 pub fn ext4_dmask_get() -> u32;
2100}
2101pub type FILE = __mlibc_file_base;
2102pub type off_t = __mlibc_int64;
2103pub type off64_t = __mlibc_int64;
2104pub type va_list = __builtin_va_list;
2105#[repr(C)]
2106#[derive(Debug, Copy, Clone)]
2107pub struct __mlibc_file_base {
2108 pub __buffer_ptr: *mut ::std::os::raw::c_char,
2109 pub __buffer_size: usize,
2110 pub __offset: usize,
2111 pub __io_offset: usize,
2112 pub __valid_limit: usize,
2113 pub __dirty_begin: usize,
2114 pub __dirty_end: usize,
2115 pub __unget_ptr: *mut ::std::os::raw::c_char,
2116 pub __io_mode: ::std::os::raw::c_int,
2117 pub __status_bits: ::std::os::raw::c_int,
2118}
2119#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2120const _: () = {
2121 ["Size of __mlibc_file_base"][::std::mem::size_of::<__mlibc_file_base>() - 72usize];
2122 ["Alignment of __mlibc_file_base"][::std::mem::align_of::<__mlibc_file_base>() - 8usize];
2123 ["Offset of field: __mlibc_file_base::__buffer_ptr"]
2124 [::std::mem::offset_of!(__mlibc_file_base, __buffer_ptr) - 0usize];
2125 ["Offset of field: __mlibc_file_base::__buffer_size"]
2126 [::std::mem::offset_of!(__mlibc_file_base, __buffer_size) - 8usize];
2127 ["Offset of field: __mlibc_file_base::__offset"]
2128 [::std::mem::offset_of!(__mlibc_file_base, __offset) - 16usize];
2129 ["Offset of field: __mlibc_file_base::__io_offset"]
2130 [::std::mem::offset_of!(__mlibc_file_base, __io_offset) - 24usize];
2131 ["Offset of field: __mlibc_file_base::__valid_limit"]
2132 [::std::mem::offset_of!(__mlibc_file_base, __valid_limit) - 32usize];
2133 ["Offset of field: __mlibc_file_base::__dirty_begin"]
2134 [::std::mem::offset_of!(__mlibc_file_base, __dirty_begin) - 40usize];
2135 ["Offset of field: __mlibc_file_base::__dirty_end"]
2136 [::std::mem::offset_of!(__mlibc_file_base, __dirty_end) - 48usize];
2137 ["Offset of field: __mlibc_file_base::__unget_ptr"]
2138 [::std::mem::offset_of!(__mlibc_file_base, __unget_ptr) - 56usize];
2139 ["Offset of field: __mlibc_file_base::__io_mode"]
2140 [::std::mem::offset_of!(__mlibc_file_base, __io_mode) - 64usize];
2141 ["Offset of field: __mlibc_file_base::__status_bits"]
2142 [::std::mem::offset_of!(__mlibc_file_base, __status_bits) - 68usize];
2143};
2144pub type fpos_t = off_t;
2145unsafe extern "C" {
2146 pub static mut stderr: *mut FILE;
2147}
2148unsafe extern "C" {
2149 pub static mut stdin: *mut FILE;
2150}
2151unsafe extern "C" {
2152 pub static mut stdout: *mut FILE;
2153}
2154unsafe extern "C" {
2155 pub fn remove(__filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2156}
2157unsafe extern "C" {
2158 pub fn rename(
2159 __old_path: *const ::std::os::raw::c_char,
2160 __new_path: *const ::std::os::raw::c_char,
2161 ) -> ::std::os::raw::c_int;
2162}
2163unsafe extern "C" {
2164 pub fn renameat(
2165 __olddirfd: ::std::os::raw::c_int,
2166 __old_path: *const ::std::os::raw::c_char,
2167 __newdirfd: ::std::os::raw::c_int,
2168 __new_path: *const ::std::os::raw::c_char,
2169 ) -> ::std::os::raw::c_int;
2170}
2171unsafe extern "C" {
2172 pub fn tmpfile() -> *mut FILE;
2173}
2174unsafe extern "C" {
2175 pub fn tmpnam(__buffer: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
2176}
2177unsafe extern "C" {
2178 pub fn fclose(__stream: *mut FILE) -> ::std::os::raw::c_int;
2179}
2180unsafe extern "C" {
2181 pub fn fflush(__stream: *mut FILE) -> ::std::os::raw::c_int;
2182}
2183unsafe extern "C" {
2184 pub fn fopen(
2185 __filename: *const ::std::os::raw::c_char,
2186 __mode: *const ::std::os::raw::c_char,
2187 ) -> *mut FILE;
2188}
2189unsafe extern "C" {
2190 pub fn freopen(
2191 __filename: *const ::std::os::raw::c_char,
2192 __mode: *const ::std::os::raw::c_char,
2193 __stream: *mut FILE,
2194 ) -> *mut FILE;
2195}
2196unsafe extern "C" {
2197 pub fn setbuf(__stream: *mut FILE, __buffer: *mut ::std::os::raw::c_char);
2198}
2199unsafe extern "C" {
2200 pub fn setvbuf(
2201 __stream: *mut FILE,
2202 __buffer: *mut ::std::os::raw::c_char,
2203 __mode: ::std::os::raw::c_int,
2204 __size: usize,
2205 ) -> ::std::os::raw::c_int;
2206}
2207unsafe extern "C" {
2208 pub fn setlinebuf(__stream: *mut FILE);
2209}
2210unsafe extern "C" {
2211 pub fn setbuffer(__stream: *mut FILE, __buffer: *mut ::std::os::raw::c_char, __size: usize);
2212}
2213unsafe extern "C" {
2214 pub fn fprintf(
2215 __stream: *mut FILE,
2216 __format: *const ::std::os::raw::c_char,
2217 ...
2218 ) -> ::std::os::raw::c_int;
2219}
2220unsafe extern "C" {
2221 pub fn fscanf(
2222 __stream: *mut FILE,
2223 __format: *const ::std::os::raw::c_char,
2224 ...
2225 ) -> ::std::os::raw::c_int;
2226}
2227unsafe extern "C" {
2228 pub fn printf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
2229}
2230unsafe extern "C" {
2231 pub fn scanf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
2232}
2233unsafe extern "C" {
2234 pub fn snprintf(
2235 __buffer: *mut ::std::os::raw::c_char,
2236 __max_size: ::std::os::raw::c_ulong,
2237 __format: *const ::std::os::raw::c_char,
2238 ...
2239 ) -> ::std::os::raw::c_int;
2240}
2241unsafe extern "C" {
2242 pub fn sprintf(
2243 __buffer: *mut ::std::os::raw::c_char,
2244 __format: *const ::std::os::raw::c_char,
2245 ...
2246 ) -> ::std::os::raw::c_int;
2247}
2248unsafe extern "C" {
2249 pub fn sscanf(
2250 __buffer: *const ::std::os::raw::c_char,
2251 __format: *const ::std::os::raw::c_char,
2252 ...
2253 ) -> ::std::os::raw::c_int;
2254}
2255unsafe extern "C" {
2256 pub fn vfprintf(
2257 __stream: *mut FILE,
2258 __format: *const ::std::os::raw::c_char,
2259 __args: *mut __va_list_tag,
2260 ) -> ::std::os::raw::c_int;
2261}
2262unsafe extern "C" {
2263 pub fn vfscanf(
2264 __stream: *mut FILE,
2265 __format: *const ::std::os::raw::c_char,
2266 __args: *mut __va_list_tag,
2267 ) -> ::std::os::raw::c_int;
2268}
2269unsafe extern "C" {
2270 pub fn vprintf(
2271 __format: *const ::std::os::raw::c_char,
2272 __args: *mut __va_list_tag,
2273 ) -> ::std::os::raw::c_int;
2274}
2275unsafe extern "C" {
2276 pub fn vscanf(
2277 __format: *const ::std::os::raw::c_char,
2278 __args: *mut __va_list_tag,
2279 ) -> ::std::os::raw::c_int;
2280}
2281unsafe extern "C" {
2282 pub fn vsnprintf(
2283 __buffer: *mut ::std::os::raw::c_char,
2284 __max_size: ::std::os::raw::c_ulong,
2285 __format: *const ::std::os::raw::c_char,
2286 __args: *mut __va_list_tag,
2287 ) -> ::std::os::raw::c_int;
2288}
2289unsafe extern "C" {
2290 pub fn vsprintf(
2291 __buffer: *mut ::std::os::raw::c_char,
2292 __format: *const ::std::os::raw::c_char,
2293 __args: *mut __va_list_tag,
2294 ) -> ::std::os::raw::c_int;
2295}
2296unsafe extern "C" {
2297 pub fn vsscanf(
2298 __buffer: *const ::std::os::raw::c_char,
2299 __format: *const ::std::os::raw::c_char,
2300 __args: *mut __va_list_tag,
2301 ) -> ::std::os::raw::c_int;
2302}
2303unsafe extern "C" {
2304 pub fn vasprintf(
2305 __buffer: *mut *mut ::std::os::raw::c_char,
2306 __format: *const ::std::os::raw::c_char,
2307 __args: *mut __va_list_tag,
2308 ) -> ::std::os::raw::c_int;
2309}
2310unsafe extern "C" {
2311 pub fn fgetc(__stream: *mut FILE) -> ::std::os::raw::c_int;
2312}
2313unsafe extern "C" {
2314 pub fn fgets(
2315 __buffer: *mut ::std::os::raw::c_char,
2316 __max_size: ::std::os::raw::c_int,
2317 __stream: *mut FILE,
2318 ) -> *mut ::std::os::raw::c_char;
2319}
2320unsafe extern "C" {
2321 pub fn fputc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
2322}
2323unsafe extern "C" {
2324 pub fn fputs(
2325 __string: *const ::std::os::raw::c_char,
2326 __stream: *mut FILE,
2327 ) -> ::std::os::raw::c_int;
2328}
2329unsafe extern "C" {
2330 pub fn getc(__stream: *mut FILE) -> ::std::os::raw::c_int;
2331}
2332unsafe extern "C" {
2333 pub fn getchar() -> ::std::os::raw::c_int;
2334}
2335unsafe extern "C" {
2336 pub fn putc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
2337}
2338unsafe extern "C" {
2339 pub fn putchar(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
2340}
2341unsafe extern "C" {
2342 pub fn puts(__string: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2343}
2344unsafe extern "C" {
2345 pub fn ungetc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
2346}
2347unsafe extern "C" {
2348 pub fn fread(
2349 __buffer: *mut ::std::os::raw::c_void,
2350 __size: ::std::os::raw::c_ulong,
2351 __count: ::std::os::raw::c_ulong,
2352 __stream: *mut FILE,
2353 ) -> ::std::os::raw::c_ulong;
2354}
2355unsafe extern "C" {
2356 pub fn fwrite(
2357 __buffer: *const ::std::os::raw::c_void,
2358 __size: ::std::os::raw::c_ulong,
2359 __count: ::std::os::raw::c_ulong,
2360 __stream: *mut FILE,
2361 ) -> ::std::os::raw::c_ulong;
2362}
2363unsafe extern "C" {
2364 pub fn fgetpos(__stream: *mut FILE, __position: *mut fpos_t) -> ::std::os::raw::c_int;
2365}
2366unsafe extern "C" {
2367 pub fn fseek(
2368 __stream: *mut FILE,
2369 __offset: ::std::os::raw::c_long,
2370 __whence: ::std::os::raw::c_int,
2371 ) -> ::std::os::raw::c_int;
2372}
2373unsafe extern "C" {
2374 pub fn fsetpos(__stream: *mut FILE, __position: *const fpos_t) -> ::std::os::raw::c_int;
2375}
2376unsafe extern "C" {
2377 pub fn ftell(__stream: *mut FILE) -> ::std::os::raw::c_long;
2378}
2379unsafe extern "C" {
2380 pub fn rewind(__stream: *mut FILE);
2381}
2382unsafe extern "C" {
2383 pub fn clearerr(__stream: *mut FILE);
2384}
2385unsafe extern "C" {
2386 pub fn feof(__stream: *mut FILE) -> ::std::os::raw::c_int;
2387}
2388unsafe extern "C" {
2389 pub fn ferror(__stream: *mut FILE) -> ::std::os::raw::c_int;
2390}
2391unsafe extern "C" {
2392 pub fn perror(__string: *const ::std::os::raw::c_char);
2393}
2394unsafe extern "C" {
2395 pub fn getc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
2396}
2397unsafe extern "C" {
2398 pub fn getchar_unlocked() -> ::std::os::raw::c_int;
2399}
2400unsafe extern "C" {
2401 pub fn putc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
2402}
2403unsafe extern "C" {
2404 pub fn putchar_unlocked(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
2405}
2406unsafe extern "C" {
2407 pub fn getline(
2408 __linep: *mut *mut ::std::os::raw::c_char,
2409 __sizep: *mut usize,
2410 __stream: *mut FILE,
2411 ) -> isize;
2412}
2413unsafe extern "C" {
2414 pub fn getdelim(
2415 __linep: *mut *mut ::std::os::raw::c_char,
2416 __sizep: *mut usize,
2417 __delim: ::std::os::raw::c_int,
2418 __stream: *mut FILE,
2419 ) -> isize;
2420}
2421unsafe extern "C" {
2422 pub fn asprintf(
2423 __buffer: *mut *mut ::std::os::raw::c_char,
2424 __format: *const ::std::os::raw::c_char,
2425 ...
2426 ) -> ::std::os::raw::c_int;
2427}
2428unsafe extern "C" {
2429 pub fn flockfile(__stream: *mut FILE);
2430}
2431unsafe extern "C" {
2432 pub fn funlockfile(__stream: *mut FILE);
2433}
2434unsafe extern "C" {
2435 pub fn ftrylockfile(__stream: *mut FILE) -> ::std::os::raw::c_int;
2436}
2437unsafe extern "C" {
2438 pub fn clearerr_unlocked(__stream: *mut FILE);
2439}
2440unsafe extern "C" {
2441 pub fn feof_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
2442}
2443unsafe extern "C" {
2444 pub fn ferror_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
2445}
2446unsafe extern "C" {
2447 pub fn fileno_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
2448}
2449unsafe extern "C" {
2450 pub fn fflush_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
2451}
2452unsafe extern "C" {
2453 pub fn fgetc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
2454}
2455unsafe extern "C" {
2456 pub fn fputc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE)
2457 -> ::std::os::raw::c_int;
2458}
2459unsafe extern "C" {
2460 pub fn fread_unlocked(
2461 __buffer: *mut ::std::os::raw::c_void,
2462 __size: usize,
2463 __count: usize,
2464 __stream: *mut FILE,
2465 ) -> usize;
2466}
2467unsafe extern "C" {
2468 pub fn fwrite_unlocked(
2469 __buffer: *const ::std::os::raw::c_void,
2470 __size: usize,
2471 __count: usize,
2472 __stream: *mut FILE,
2473 ) -> usize;
2474}
2475unsafe extern "C" {
2476 pub fn tempnam(
2477 __dir: *const ::std::os::raw::c_char,
2478 __pfx: *const ::std::os::raw::c_char,
2479 ) -> *mut ::std::os::raw::c_char;
2480}
2481unsafe extern "C" {
2482 pub fn ctermid(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
2483}
2484unsafe extern "C" {
2485 pub fn fileno(__file: *mut FILE) -> ::std::os::raw::c_int;
2486}
2487unsafe extern "C" {
2488 pub fn fdopen(__fd: ::std::os::raw::c_int, __mode: *const ::std::os::raw::c_char) -> *mut FILE;
2489}
2490unsafe extern "C" {
2491 pub fn fmemopen(
2492 __buf: *mut ::std::os::raw::c_void,
2493 __size: usize,
2494 __mode: *const ::std::os::raw::c_char,
2495 ) -> *mut FILE;
2496}
2497unsafe extern "C" {
2498 pub fn pclose(__file: *mut FILE) -> ::std::os::raw::c_int;
2499}
2500unsafe extern "C" {
2501 pub fn popen(
2502 __command: *const ::std::os::raw::c_char,
2503 __type: *const ::std::os::raw::c_char,
2504 ) -> *mut FILE;
2505}
2506unsafe extern "C" {
2507 pub fn open_memstream(
2508 __buf: *mut *mut ::std::os::raw::c_char,
2509 __sizeloc: *mut usize,
2510 ) -> *mut FILE;
2511}
2512unsafe extern "C" {
2513 pub fn fseeko(
2514 __stream: *mut FILE,
2515 __offset: off_t,
2516 __whence: ::std::os::raw::c_int,
2517 ) -> ::std::os::raw::c_int;
2518}
2519unsafe extern "C" {
2520 pub fn ftello(__stream: *mut FILE) -> off_t;
2521}
2522unsafe extern "C" {
2523 pub fn dprintf(
2524 __fd: ::std::os::raw::c_int,
2525 __format: *const ::std::os::raw::c_char,
2526 ...
2527 ) -> ::std::os::raw::c_int;
2528}
2529unsafe extern "C" {
2530 pub fn vdprintf(
2531 __fd: ::std::os::raw::c_int,
2532 __format: *const ::std::os::raw::c_char,
2533 __args: *mut __va_list_tag,
2534 ) -> ::std::os::raw::c_int;
2535}
2536#[doc = "@brief OS dependent lock interface."]
2537#[repr(C)]
2538#[derive(Debug, Copy, Clone)]
2539pub struct ext4_lock {
2540 #[doc = "@brief Lock access to mount point."]
2541 pub lock: ::std::option::Option<unsafe extern "C" fn()>,
2542 #[doc = "@brief Unlock access to mount point."]
2543 pub unlock: ::std::option::Option<unsafe extern "C" fn()>,
2544}
2545#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2546const _: () = {
2547 ["Size of ext4_lock"][::std::mem::size_of::<ext4_lock>() - 16usize];
2548 ["Alignment of ext4_lock"][::std::mem::align_of::<ext4_lock>() - 8usize];
2549 ["Offset of field: ext4_lock::lock"][::std::mem::offset_of!(ext4_lock, lock) - 0usize];
2550 ["Offset of field: ext4_lock::unlock"][::std::mem::offset_of!(ext4_lock, unlock) - 8usize];
2551};
2552#[doc = "@brief File descriptor."]
2553#[repr(C)]
2554#[derive(Debug, Copy, Clone)]
2555pub struct ext4_file {
2556 #[doc = "@brief Mount point handle."]
2557 pub mp: *mut ext4_mountpoint,
2558 #[doc = "@brief File inode id."]
2559 pub inode: u32,
2560 #[doc = "@brief Open flags."]
2561 pub flags: u32,
2562 #[doc = "@brief File size."]
2563 pub fsize: u64,
2564 #[doc = "@brief Actual file position."]
2565 pub fpos: u64,
2566}
2567#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2568const _: () = {
2569 ["Size of ext4_file"][::std::mem::size_of::<ext4_file>() - 32usize];
2570 ["Alignment of ext4_file"][::std::mem::align_of::<ext4_file>() - 8usize];
2571 ["Offset of field: ext4_file::mp"][::std::mem::offset_of!(ext4_file, mp) - 0usize];
2572 ["Offset of field: ext4_file::inode"][::std::mem::offset_of!(ext4_file, inode) - 8usize];
2573 ["Offset of field: ext4_file::flags"][::std::mem::offset_of!(ext4_file, flags) - 12usize];
2574 ["Offset of field: ext4_file::fsize"][::std::mem::offset_of!(ext4_file, fsize) - 16usize];
2575 ["Offset of field: ext4_file::fpos"][::std::mem::offset_of!(ext4_file, fpos) - 24usize];
2576};
2577#[doc = "@brief Directory entry descriptor."]
2578#[repr(C)]
2579#[derive(Debug, Copy, Clone)]
2580pub struct ext4_direntry {
2581 pub inode: u32,
2582 pub entry_length: u16,
2583 pub name_length: u8,
2584 pub inode_type: u8,
2585 pub name: [u8; 255usize],
2586}
2587#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2588const _: () = {
2589 ["Size of ext4_direntry"][::std::mem::size_of::<ext4_direntry>() - 264usize];
2590 ["Alignment of ext4_direntry"][::std::mem::align_of::<ext4_direntry>() - 4usize];
2591 ["Offset of field: ext4_direntry::inode"]
2592 [::std::mem::offset_of!(ext4_direntry, inode) - 0usize];
2593 ["Offset of field: ext4_direntry::entry_length"]
2594 [::std::mem::offset_of!(ext4_direntry, entry_length) - 4usize];
2595 ["Offset of field: ext4_direntry::name_length"]
2596 [::std::mem::offset_of!(ext4_direntry, name_length) - 6usize];
2597 ["Offset of field: ext4_direntry::inode_type"]
2598 [::std::mem::offset_of!(ext4_direntry, inode_type) - 7usize];
2599 ["Offset of field: ext4_direntry::name"][::std::mem::offset_of!(ext4_direntry, name) - 8usize];
2600};
2601#[doc = "@brief Directory descriptor."]
2602#[repr(C)]
2603#[derive(Debug, Copy, Clone)]
2604pub struct ext4_dir {
2605 #[doc = "@brief File descriptor."]
2606 pub f: ext4_file,
2607 #[doc = "@brief Current directory entry."]
2608 pub de: ext4_direntry,
2609 #[doc = "@brief Next entry offset."]
2610 pub next_off: u64,
2611}
2612#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2613const _: () = {
2614 ["Size of ext4_dir"][::std::mem::size_of::<ext4_dir>() - 304usize];
2615 ["Alignment of ext4_dir"][::std::mem::align_of::<ext4_dir>() - 8usize];
2616 ["Offset of field: ext4_dir::f"][::std::mem::offset_of!(ext4_dir, f) - 0usize];
2617 ["Offset of field: ext4_dir::de"][::std::mem::offset_of!(ext4_dir, de) - 32usize];
2618 ["Offset of field: ext4_dir::next_off"][::std::mem::offset_of!(ext4_dir, next_off) - 296usize];
2619};
2620unsafe extern "C" {
2621 #[doc = "@brief Register block device.\n\n @param bd Block device.\n @param dev_name Block device name.\n\n @return Standard error code."]
2622 pub fn ext4_device_register(
2623 bd: *mut ext4_blockdev,
2624 dev_name: *const ::std::os::raw::c_char,
2625 ) -> ::std::os::raw::c_int;
2626}
2627unsafe extern "C" {
2628 #[doc = "@brief Un-register block device.\n\n @param dev_name Block device name.\n\n @return Standard error code."]
2629 pub fn ext4_device_unregister(dev_name: *const ::std::os::raw::c_char)
2630 -> ::std::os::raw::c_int;
2631}
2632unsafe extern "C" {
2633 #[doc = "@brief Un-register all block devices.\n\n @return Standard error code."]
2634 pub fn ext4_device_unregister_all() -> ::std::os::raw::c_int;
2635}
2636unsafe extern "C" {
2637 #[doc = "@brief Mount a block device with EXT4 partition to the mount point.\n\n @param dev_name Block device name (@ref ext4_device_register).\n @param mount_point Mount point, for example:\n - /\n - /my_partition/\n - /my_second_partition/\n @param read_only mount as read-only mode.\n\n @return Standard error code"]
2638 pub fn ext4_mount(
2639 dev_name: *const ::std::os::raw::c_char,
2640 mount_point: *const ::std::os::raw::c_char,
2641 read_only: bool,
2642 ) -> ::std::os::raw::c_int;
2643}
2644unsafe extern "C" {
2645 #[doc = "@brief Umount operation.\n\n @param mount_point Mount point.\n\n @return Standard error code"]
2646 pub fn ext4_umount(mount_point: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2647}
2648#[repr(C)]
2649#[derive(Debug, Copy, Clone)]
2650pub struct ext4_mountpoint {
2651 _unused: [u8; 0],
2652}
2653unsafe extern "C" {
2654 pub fn ext4_get_mount(path: *const ::std::os::raw::c_char) -> *mut ext4_mountpoint;
2655}
2656unsafe extern "C" {
2657 #[doc = "@brief Starts journaling. Journaling start/stop functions are transparent\n and might be used on filesystems without journaling support.\n @warning Usage:\n ext4_mount(\"sda1\", \"/\");\n ext4_journal_start(\"/\");\n\n //File operations here...\n\n ext4_journal_stop(\"/\");\n ext4_umount(\"/\");\n @param mount_point Mount point.\n\n @return Standard error code."]
2658 pub fn ext4_journal_start(mount_point: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2659}
2660unsafe extern "C" {
2661 #[doc = "@brief Stops journaling. Journaling start/stop functions are transparent\n and might be used on filesystems without journaling support.\n\n @param mount_point Mount point name.\n\n @return Standard error code."]
2662 pub fn ext4_journal_stop(mount_point: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2663}
2664unsafe extern "C" {
2665 #[doc = "@brief Journal recovery.\n @warning Must be called after @ref ext4_mount.\n\n @param mount_point Mount point.\n\n @return Standard error code."]
2666 pub fn ext4_recover(mount_point: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2667}
2668#[doc = "@brief Some of the filesystem stats."]
2669#[repr(C)]
2670#[derive(Debug, Copy, Clone)]
2671pub struct ext4_mount_stats {
2672 pub inodes_count: u32,
2673 pub free_inodes_count: u32,
2674 pub blocks_count: u64,
2675 pub free_blocks_count: u64,
2676 pub block_size: u32,
2677 pub block_group_count: u32,
2678 pub blocks_per_group: u32,
2679 pub inodes_per_group: u32,
2680 pub volume_name: [::std::os::raw::c_char; 16usize],
2681}
2682#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2683const _: () = {
2684 ["Size of ext4_mount_stats"][::std::mem::size_of::<ext4_mount_stats>() - 56usize];
2685 ["Alignment of ext4_mount_stats"][::std::mem::align_of::<ext4_mount_stats>() - 8usize];
2686 ["Offset of field: ext4_mount_stats::inodes_count"]
2687 [::std::mem::offset_of!(ext4_mount_stats, inodes_count) - 0usize];
2688 ["Offset of field: ext4_mount_stats::free_inodes_count"]
2689 [::std::mem::offset_of!(ext4_mount_stats, free_inodes_count) - 4usize];
2690 ["Offset of field: ext4_mount_stats::blocks_count"]
2691 [::std::mem::offset_of!(ext4_mount_stats, blocks_count) - 8usize];
2692 ["Offset of field: ext4_mount_stats::free_blocks_count"]
2693 [::std::mem::offset_of!(ext4_mount_stats, free_blocks_count) - 16usize];
2694 ["Offset of field: ext4_mount_stats::block_size"]
2695 [::std::mem::offset_of!(ext4_mount_stats, block_size) - 24usize];
2696 ["Offset of field: ext4_mount_stats::block_group_count"]
2697 [::std::mem::offset_of!(ext4_mount_stats, block_group_count) - 28usize];
2698 ["Offset of field: ext4_mount_stats::blocks_per_group"]
2699 [::std::mem::offset_of!(ext4_mount_stats, blocks_per_group) - 32usize];
2700 ["Offset of field: ext4_mount_stats::inodes_per_group"]
2701 [::std::mem::offset_of!(ext4_mount_stats, inodes_per_group) - 36usize];
2702 ["Offset of field: ext4_mount_stats::volume_name"]
2703 [::std::mem::offset_of!(ext4_mount_stats, volume_name) - 40usize];
2704};
2705unsafe extern "C" {
2706 #[doc = "@brief Get file mount point stats.\n\n @param mount_point Mount point.\n @param stats Filesystem stats.\n\n @return Standard error code."]
2707 pub fn ext4_mount_point_stats(
2708 mount_point: *const ::std::os::raw::c_char,
2709 stats: *mut ext4_mount_stats,
2710 ) -> ::std::os::raw::c_int;
2711}
2712unsafe extern "C" {
2713 #[doc = "@brief Setup OS lock routines.\n\n @param mount_point Mount point.\n @param locks Lock and unlock functions\n\n @return Standard error code."]
2714 pub fn ext4_mount_setup_locks(
2715 mount_point: *const ::std::os::raw::c_char,
2716 locks: *const ext4_lock,
2717 ) -> ::std::os::raw::c_int;
2718}
2719unsafe extern "C" {
2720 #[doc = "@brief Acquire the filesystem superblock pointer of a mp.\n\n @param mount_point Mount point.\n @param sb Superblock handle\n\n @return Standard error code."]
2721 pub fn ext4_get_sblock(
2722 mount_point: *const ::std::os::raw::c_char,
2723 sb: *mut *mut ext4_sblock,
2724 ) -> ::std::os::raw::c_int;
2725}
2726unsafe extern "C" {
2727 #[doc = "@brief Enable/disable write back cache mode.\n @warning Default model of cache is write trough. It means that when You do:\n\n ext4_fopen(...);\n ext4_fwrite(...);\n < --- data is flushed to physical drive\n\n When you do:\n ext4_cache_write_back(..., 1);\n ext4_fopen(...);\n ext4_fwrite(...);\n < --- data is NOT flushed to physical drive\n ext4_cache_write_back(..., 0);\n < --- when write back mode is disabled all\n cache data will be flushed\n To enable write back mode permanently just call this function\n once after ext4_mount (and disable before ext4_umount).\n\n Some of the function use write back cache mode internally.\n If you enable write back mode twice you have to disable it twice\n to flush all data:\n\n ext4_cache_write_back(..., 1);\n ext4_cache_write_back(..., 1);\n\n ext4_cache_write_back(..., 0);\n ext4_cache_write_back(..., 0);\n\n Write back mode is useful when you want to create a lot of empty\n files/directories.\n\n @param path Mount point.\n @param on Enable/disable cache writeback mode.\n\n @return Standard error code."]
2728 pub fn ext4_cache_write_back(
2729 path: *const ::std::os::raw::c_char,
2730 on: bool,
2731 ) -> ::std::os::raw::c_int;
2732}
2733unsafe extern "C" {
2734 #[doc = "@brief Force cache flush.\n\n @param path Mount point.\n\n @return Standard error code."]
2735 pub fn ext4_cache_flush(path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2736}
2737unsafe extern "C" {
2738 #[doc = "@brief Remove file by path.\n\n @param path Path to file.\n\n @return Standard error code."]
2739 pub fn ext4_fremove(path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2740}
2741unsafe extern "C" {
2742 #[doc = "@brief Create a hardlink for a file.\n\n @param path Path to file.\n @param hardlink_path Path of hardlink.\n\n @return Standard error code."]
2743 pub fn ext4_flink(
2744 path: *const ::std::os::raw::c_char,
2745 hardlink_path: *const ::std::os::raw::c_char,
2746 ) -> ::std::os::raw::c_int;
2747}
2748unsafe extern "C" {
2749 pub fn ext4_link(
2750 mp: *mut ext4_mountpoint,
2751 parent: *mut ext4_inode_ref,
2752 ch: *mut ext4_inode_ref,
2753 n: *const ::std::os::raw::c_char,
2754 len: u32,
2755 rename: bool,
2756 ) -> ::std::os::raw::c_int;
2757}
2758unsafe extern "C" {
2759 #[doc = "@brief Rename file.\n @param path Source.\n @param new_path Destination.\n @return Standard error code."]
2760 pub fn ext4_frename(
2761 path: *const ::std::os::raw::c_char,
2762 new_path: *const ::std::os::raw::c_char,
2763 ) -> ::std::os::raw::c_int;
2764}
2765unsafe extern "C" {
2766 #[doc = "@brief File open function.\n\n @param file File handle.\n @param path File path, has to start from mount point:/my_partition/file.\n @param flags File open flags.\n |---------------------------------------------------------------|\n | r or rb O_RDONLY |\n |---------------------------------------------------------------|\n | w or wb O_WRONLY|O_CREAT|O_TRUNC |\n |---------------------------------------------------------------|\n | a or ab O_WRONLY|O_CREAT|O_APPEND |\n |---------------------------------------------------------------|\n | r+ or rb+ or r+b O_RDWR |\n |---------------------------------------------------------------|\n | w+ or wb+ or w+b O_RDWR|O_CREAT|O_TRUNC |\n |---------------------------------------------------------------|\n | a+ or ab+ or a+b O_RDWR|O_CREAT|O_APPEND |\n |---------------------------------------------------------------|\n\n @return Standard error code."]
2767 pub fn ext4_fopen(
2768 file: *mut ext4_file,
2769 path: *const ::std::os::raw::c_char,
2770 flags: *const ::std::os::raw::c_char,
2771 ) -> ::std::os::raw::c_int;
2772}
2773unsafe extern "C" {
2774 #[doc = "@brief Alternate file open function.\n\n @param file File handle.\n @param path File path, has to start from mount point:/my_partition/file.\n @param flags File open flags.\n\n @return Standard error code."]
2775 pub fn ext4_fopen2(
2776 file: *mut ext4_file,
2777 path: *const ::std::os::raw::c_char,
2778 flags: ::std::os::raw::c_int,
2779 ) -> ::std::os::raw::c_int;
2780}
2781unsafe extern "C" {
2782 #[doc = "@brief File close function.\n\n @param file File handle.\n\n @return Standard error code."]
2783 pub fn ext4_fclose(file: *mut ext4_file) -> ::std::os::raw::c_int;
2784}
2785unsafe extern "C" {
2786 #[doc = "@brief File truncate function.\n\n @param file File handle.\n @param size New file size.\n\n @return Standard error code."]
2787 pub fn ext4_ftruncate(file: *mut ext4_file, size: u64) -> ::std::os::raw::c_int;
2788}
2789unsafe extern "C" {
2790 #[doc = "@brief Read data from file.\n\n @param file File handle.\n @param buf Output buffer.\n @param size Bytes to read.\n @param rcnt Bytes read (NULL allowed).\n\n @return Standard error code."]
2791 pub fn ext4_fread(
2792 file: *mut ext4_file,
2793 buf: *mut ::std::os::raw::c_void,
2794 size: usize,
2795 rcnt: *mut usize,
2796 ) -> ::std::os::raw::c_int;
2797}
2798unsafe extern "C" {
2799 #[doc = "@brief Write data to file.\n\n @param file File handle.\n @param buf Data to write\n @param size Write length..\n @param wcnt Bytes written (NULL allowed).\n\n @return Standard error code."]
2800 pub fn ext4_fwrite(
2801 file: *mut ext4_file,
2802 buf: *const ::std::os::raw::c_void,
2803 size: usize,
2804 wcnt: *mut usize,
2805 ) -> ::std::os::raw::c_int;
2806}
2807unsafe extern "C" {
2808 #[doc = "@brief File seek operation.\n\n @param file File handle.\n @param offset Offset to seek.\n @param origin Seek type:\n @ref SEEK_SET\n @ref SEEK_CUR\n @ref SEEK_END\n\n @return Standard error code."]
2809 pub fn ext4_fseek(file: *mut ext4_file, offset: i64, origin: u32) -> ::std::os::raw::c_int;
2810}
2811unsafe extern "C" {
2812 #[doc = "@brief Get file position.\n\n @param file File handle.\n\n @return Actual file position"]
2813 pub fn ext4_ftell(file: *mut ext4_file) -> u64;
2814}
2815unsafe extern "C" {
2816 #[doc = "@brief Get file size.\n\n @param file File handle.\n\n @return File size."]
2817 pub fn ext4_fsize(file: *mut ext4_file) -> u64;
2818}
2819unsafe extern "C" {
2820 #[doc = "@brief Get inode of file/directory/link.\n\n @param path Parh to file/dir/link.\n @param ret_ino Inode number.\n @param inode Inode internals.\n\n @return Standard error code."]
2821 pub fn ext4_raw_inode_fill(
2822 path: *const ::std::os::raw::c_char,
2823 ret_ino: *mut u32,
2824 inode: *mut ext4_inode,
2825 ) -> ::std::os::raw::c_int;
2826}
2827unsafe extern "C" {
2828 #[doc = "@brief Check if inode exists.\n\n @param path Parh to file/dir/link.\n @param type Inode type.\n @ref EXT4_DIRENTRY_UNKNOWN\n @ref EXT4_DE_REG_FILE\n @ref EXT4_DE_DIR\n @ref EXT4_DE_CHRDEV\n @ref EXT4_DE_BLKDEV\n @ref EXT4_DE_FIFO\n @ref EXT4_DE_SOCK\n @ref EXT4_DE_SYMLINK\n\n @return Standard error code."]
2829 pub fn ext4_inode_exist(
2830 path: *const ::std::os::raw::c_char,
2831 type_: ::std::os::raw::c_int,
2832 ) -> ::std::os::raw::c_int;
2833}
2834unsafe extern "C" {
2835 #[doc = "@brief Change file/directory/link mode bits.\n\n @param path Path to file/dir/link.\n @param mode New mode bits (for example 0777).\n\n @return Standard error code."]
2836 pub fn ext4_mode_set(path: *const ::std::os::raw::c_char, mode: u32) -> ::std::os::raw::c_int;
2837}
2838unsafe extern "C" {
2839 #[doc = "@brief Get file/directory/link mode bits.\n\n @param path Path to file/dir/link.\n @param mode New mode bits (for example 0777).\n\n @return Standard error code."]
2840 pub fn ext4_mode_get(
2841 path: *const ::std::os::raw::c_char,
2842 mode: *mut u32,
2843 ) -> ::std::os::raw::c_int;
2844}
2845unsafe extern "C" {
2846 #[doc = "@brief Change file owner and group.\n\n @param path Path to file/dir/link.\n @param uid User id.\n @param gid Group id.\n\n @return Standard error code."]
2847 pub fn ext4_owner_set(
2848 path: *const ::std::os::raw::c_char,
2849 uid: u32,
2850 gid: u32,
2851 ) -> ::std::os::raw::c_int;
2852}
2853unsafe extern "C" {
2854 #[doc = "@brief Get file/directory/link owner and group.\n\n @param path Path to file/dir/link.\n @param uid User id.\n @param gid Group id.\n\n @return Standard error code."]
2855 pub fn ext4_owner_get(
2856 path: *const ::std::os::raw::c_char,
2857 uid: *mut u32,
2858 gid: *mut u32,
2859 ) -> ::std::os::raw::c_int;
2860}
2861unsafe extern "C" {
2862 #[doc = "@brief Set file/directory/link access time.\n\n @param path Path to file/dir/link.\n @param atime Access timestamp.\n\n @return Standard error code."]
2863 pub fn ext4_atime_set(path: *const ::std::os::raw::c_char, atime: u32)
2864 -> ::std::os::raw::c_int;
2865}
2866unsafe extern "C" {
2867 #[doc = "@brief Set file/directory/link modify time.\n\n @param path Path to file/dir/link.\n @param mtime Modify timestamp.\n\n @return Standard error code."]
2868 pub fn ext4_mtime_set(path: *const ::std::os::raw::c_char, mtime: u32)
2869 -> ::std::os::raw::c_int;
2870}
2871unsafe extern "C" {
2872 #[doc = "@brief Set file/directory/link change time.\n\n @param path Path to file/dir/link.\n @param ctime Change timestamp.\n\n @return Standard error code."]
2873 pub fn ext4_ctime_set(path: *const ::std::os::raw::c_char, ctime: u32)
2874 -> ::std::os::raw::c_int;
2875}
2876unsafe extern "C" {
2877 #[doc = "@brief Get file/directory/link access time.\n\n @param path Path to file/dir/link.\n @param atime Access timestamp.\n\n @return Standard error code."]
2878 pub fn ext4_atime_get(
2879 path: *const ::std::os::raw::c_char,
2880 atime: *mut u32,
2881 ) -> ::std::os::raw::c_int;
2882}
2883unsafe extern "C" {
2884 #[doc = "@brief Get file/directory/link modify time.\n\n @param path Path to file/dir/link.\n @param mtime Modify timestamp.\n\n @return Standard error code."]
2885 pub fn ext4_mtime_get(
2886 path: *const ::std::os::raw::c_char,
2887 mtime: *mut u32,
2888 ) -> ::std::os::raw::c_int;
2889}
2890unsafe extern "C" {
2891 #[doc = "@brief Get file/directory/link change time.\n\n @param path Pathto file/dir/link.\n @param ctime Change timestamp.\n\n @return standard error code"]
2892 pub fn ext4_ctime_get(
2893 path: *const ::std::os::raw::c_char,
2894 ctime: *mut u32,
2895 ) -> ::std::os::raw::c_int;
2896}
2897unsafe extern "C" {
2898 #[doc = "@brief Create symbolic link.\n\n @param target Destination entry path.\n @param path Source entry path.\n\n @return Standard error code."]
2899 pub fn ext4_fsymlink(
2900 target: *const ::std::os::raw::c_char,
2901 path: *const ::std::os::raw::c_char,
2902 ) -> ::std::os::raw::c_int;
2903}
2904unsafe extern "C" {
2905 #[doc = "@brief Create special file.\n @param path Path to new special file.\n @param filetype Filetype of the new special file.\n \t (that must not be regular file, directory, or unknown type)\n @param dev If filetype is char device or block device,\n \t the device number will become the payload in the inode.\n @return Standard error code."]
2906 pub fn ext4_mknod(
2907 path: *const ::std::os::raw::c_char,
2908 filetype: ::std::os::raw::c_int,
2909 dev: u32,
2910 ) -> ::std::os::raw::c_int;
2911}
2912unsafe extern "C" {
2913 #[doc = "@brief Read symbolic link payload.\n\n @param path Path to symlink.\n @param buf Output buffer.\n @param bufsize Output buffer max size.\n @param rcnt Bytes read.\n\n @return Standard error code."]
2914 pub fn ext4_readlink(
2915 path: *const ::std::os::raw::c_char,
2916 buf: *mut ::std::os::raw::c_char,
2917 bufsize: usize,
2918 rcnt: *mut usize,
2919 ) -> ::std::os::raw::c_int;
2920}
2921unsafe extern "C" {
2922 #[doc = "@brief Set extended attribute.\n\n @param path Path to file/directory\n @param name Name of the entry to add.\n @param name_len Length of @name in bytes.\n @param data Data of the entry to add.\n @param data_size Size of data to add.\n\n @return Standard error code."]
2923 pub fn ext4_setxattr(
2924 path: *const ::std::os::raw::c_char,
2925 name: *const ::std::os::raw::c_char,
2926 name_len: usize,
2927 data: *const ::std::os::raw::c_void,
2928 data_size: usize,
2929 ) -> ::std::os::raw::c_int;
2930}
2931unsafe extern "C" {
2932 #[doc = "@brief Get extended attribute.\n\n @param path Path to file/directory.\n @param name Name of the entry to get.\n @param name_len Length of @name in bytes.\n @param buf Data of the entry to get.\n @param buf_size Size of data to get.\n\n @return Standard error code."]
2933 pub fn ext4_getxattr(
2934 path: *const ::std::os::raw::c_char,
2935 name: *const ::std::os::raw::c_char,
2936 name_len: usize,
2937 buf: *mut ::std::os::raw::c_void,
2938 buf_size: usize,
2939 data_size: *mut usize,
2940 ) -> ::std::os::raw::c_int;
2941}
2942unsafe extern "C" {
2943 #[doc = "@brief List extended attributes.\n\n @param path Path to file/directory.\n @param list List to hold the name of entries.\n @param size Size of @list in bytes.\n @param ret_size Used bytes of @list.\n\n @return Standard error code."]
2944 pub fn ext4_listxattr(
2945 path: *const ::std::os::raw::c_char,
2946 list: *mut ::std::os::raw::c_char,
2947 size: usize,
2948 ret_size: *mut usize,
2949 ) -> ::std::os::raw::c_int;
2950}
2951unsafe extern "C" {
2952 #[doc = "@brief Remove extended attribute.\n\n @param path Path to file/directory.\n @param name Name of the entry to remove.\n @param name_len Length of @name in bytes.\n\n @return Standard error code."]
2953 pub fn ext4_removexattr(
2954 path: *const ::std::os::raw::c_char,
2955 name: *const ::std::os::raw::c_char,
2956 name_len: usize,
2957 ) -> ::std::os::raw::c_int;
2958}
2959unsafe extern "C" {
2960 #[doc = "@brief Recursive directory remove.\n\n @param path Directory path to remove\n\n @return Standard error code."]
2961 pub fn ext4_dir_rm(path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2962}
2963unsafe extern "C" {
2964 #[doc = "@brief Rename/move directory.\n\n @param path Source path.\n @param new_path Destination path.\n\n @return Standard error code."]
2965 pub fn ext4_dir_mv(
2966 path: *const ::std::os::raw::c_char,
2967 new_path: *const ::std::os::raw::c_char,
2968 ) -> ::std::os::raw::c_int;
2969}
2970unsafe extern "C" {
2971 #[doc = "@brief Create new directory.\n\n @param path Directory name.\n\n @return Standard error code."]
2972 pub fn ext4_dir_mk(path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2973}
2974unsafe extern "C" {
2975 #[doc = "@brief Directory open.\n\n @param dir Directory handle.\n @param path Directory path.\n\n @return Standard error code."]
2976 pub fn ext4_dir_open(
2977 dir: *mut ext4_dir,
2978 path: *const ::std::os::raw::c_char,
2979 ) -> ::std::os::raw::c_int;
2980}
2981unsafe extern "C" {
2982 #[doc = "@brief Directory close.\n\n @param dir directory handle.\n\n @return Standard error code."]
2983 pub fn ext4_dir_close(dir: *mut ext4_dir) -> ::std::os::raw::c_int;
2984}
2985unsafe extern "C" {
2986 #[doc = "@brief Return next directory entry.\n\n @param dir Directory handle.\n\n @return Directory entry id (NULL if no entry)"]
2987 pub fn ext4_dir_entry_next(dir: *mut ext4_dir) -> *const ext4_direntry;
2988}
2989unsafe extern "C" {
2990 #[doc = "@brief Rewine directory entry offset.\n\n @param dir Directory handle."]
2991 pub fn ext4_dir_entry_rewind(dir: *mut ext4_dir);
2992}
2993#[repr(C)]
2994#[derive(Debug, Copy, Clone)]
2995pub struct ext4_fs {
2996 pub read_only: bool,
2997 pub bdev: *mut ext4_blockdev,
2998 pub sb: ext4_sblock,
2999 pub inode_block_limits: [u64; 4usize],
3000 pub inode_blocks_per_level: [u64; 4usize],
3001 pub last_inode_bg_id: u32,
3002 pub jbd_fs: *mut jbd_fs,
3003 pub jbd_journal: *mut jbd_journal,
3004 pub curr_trans: *mut jbd_trans,
3005 pub inode_alloc_lock: ::std::option::Option<unsafe extern "C" fn()>,
3006 pub inode_alloc_unlock: ::std::option::Option<unsafe extern "C" fn()>,
3007 pub block_alloc_lock: ::std::option::Option<unsafe extern "C" fn()>,
3008 pub block_alloc_unlock: ::std::option::Option<unsafe extern "C" fn()>,
3009 pub bcache_lock: ::std::option::Option<unsafe extern "C" fn()>,
3010 pub bcache_unlock: ::std::option::Option<unsafe extern "C" fn()>,
3011}
3012#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3013const _: () = {
3014 ["Size of ext4_fs"][::std::mem::size_of::<ext4_fs>() - 1184usize];
3015 ["Alignment of ext4_fs"][::std::mem::align_of::<ext4_fs>() - 8usize];
3016 ["Offset of field: ext4_fs::read_only"][::std::mem::offset_of!(ext4_fs, read_only) - 0usize];
3017 ["Offset of field: ext4_fs::bdev"][::std::mem::offset_of!(ext4_fs, bdev) - 8usize];
3018 ["Offset of field: ext4_fs::sb"][::std::mem::offset_of!(ext4_fs, sb) - 16usize];
3019 ["Offset of field: ext4_fs::inode_block_limits"]
3020 [::std::mem::offset_of!(ext4_fs, inode_block_limits) - 1040usize];
3021 ["Offset of field: ext4_fs::inode_blocks_per_level"]
3022 [::std::mem::offset_of!(ext4_fs, inode_blocks_per_level) - 1072usize];
3023 ["Offset of field: ext4_fs::last_inode_bg_id"]
3024 [::std::mem::offset_of!(ext4_fs, last_inode_bg_id) - 1104usize];
3025 ["Offset of field: ext4_fs::jbd_fs"][::std::mem::offset_of!(ext4_fs, jbd_fs) - 1112usize];
3026 ["Offset of field: ext4_fs::jbd_journal"]
3027 [::std::mem::offset_of!(ext4_fs, jbd_journal) - 1120usize];
3028 ["Offset of field: ext4_fs::curr_trans"]
3029 [::std::mem::offset_of!(ext4_fs, curr_trans) - 1128usize];
3030 ["Offset of field: ext4_fs::inode_alloc_lock"]
3031 [::std::mem::offset_of!(ext4_fs, inode_alloc_lock) - 1136usize];
3032 ["Offset of field: ext4_fs::inode_alloc_unlock"]
3033 [::std::mem::offset_of!(ext4_fs, inode_alloc_unlock) - 1144usize];
3034 ["Offset of field: ext4_fs::block_alloc_lock"]
3035 [::std::mem::offset_of!(ext4_fs, block_alloc_lock) - 1152usize];
3036 ["Offset of field: ext4_fs::block_alloc_unlock"]
3037 [::std::mem::offset_of!(ext4_fs, block_alloc_unlock) - 1160usize];
3038 ["Offset of field: ext4_fs::bcache_lock"]
3039 [::std::mem::offset_of!(ext4_fs, bcache_lock) - 1168usize];
3040 ["Offset of field: ext4_fs::bcache_unlock"]
3041 [::std::mem::offset_of!(ext4_fs, bcache_unlock) - 1176usize];
3042};
3043#[repr(C)]
3044#[derive(Debug, Copy, Clone)]
3045pub struct ext4_block_group_ref {
3046 pub block: ext4_block,
3047 pub block_group: *mut ext4_bgroup,
3048 pub fs: *mut ext4_fs,
3049 pub index: u32,
3050 pub dirty: bool,
3051}
3052#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3053const _: () = {
3054 ["Size of ext4_block_group_ref"][::std::mem::size_of::<ext4_block_group_ref>() - 48usize];
3055 ["Alignment of ext4_block_group_ref"][::std::mem::align_of::<ext4_block_group_ref>() - 8usize];
3056 ["Offset of field: ext4_block_group_ref::block"]
3057 [::std::mem::offset_of!(ext4_block_group_ref, block) - 0usize];
3058 ["Offset of field: ext4_block_group_ref::block_group"]
3059 [::std::mem::offset_of!(ext4_block_group_ref, block_group) - 24usize];
3060 ["Offset of field: ext4_block_group_ref::fs"]
3061 [::std::mem::offset_of!(ext4_block_group_ref, fs) - 32usize];
3062 ["Offset of field: ext4_block_group_ref::index"]
3063 [::std::mem::offset_of!(ext4_block_group_ref, index) - 40usize];
3064 ["Offset of field: ext4_block_group_ref::dirty"]
3065 [::std::mem::offset_of!(ext4_block_group_ref, dirty) - 44usize];
3066};
3067#[repr(C)]
3068#[derive(Debug, Copy, Clone)]
3069pub struct ext4_inode_ref {
3070 pub block: ext4_block,
3071 pub inode: *mut ext4_inode,
3072 pub fs: *mut ext4_fs,
3073 pub index: u32,
3074 pub dirty: bool,
3075}
3076#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3077const _: () = {
3078 ["Size of ext4_inode_ref"][::std::mem::size_of::<ext4_inode_ref>() - 48usize];
3079 ["Alignment of ext4_inode_ref"][::std::mem::align_of::<ext4_inode_ref>() - 8usize];
3080 ["Offset of field: ext4_inode_ref::block"]
3081 [::std::mem::offset_of!(ext4_inode_ref, block) - 0usize];
3082 ["Offset of field: ext4_inode_ref::inode"]
3083 [::std::mem::offset_of!(ext4_inode_ref, inode) - 24usize];
3084 ["Offset of field: ext4_inode_ref::fs"][::std::mem::offset_of!(ext4_inode_ref, fs) - 32usize];
3085 ["Offset of field: ext4_inode_ref::index"]
3086 [::std::mem::offset_of!(ext4_inode_ref, index) - 40usize];
3087 ["Offset of field: ext4_inode_ref::dirty"]
3088 [::std::mem::offset_of!(ext4_inode_ref, dirty) - 44usize];
3089};
3090unsafe extern "C" {
3091 pub fn ext4_mountpoint_fs(mountpoint: *const ::std::os::raw::c_char) -> *mut ext4_fs;
3092}
3093unsafe extern "C" {
3094 #[doc = "@brief Initialize filesystem and read all needed data.\n @param fs Filesystem instance to be initialized\n @param bdev Identifier if device with the filesystem\n @param read_only Mark the filesystem as read-only.\n @return Error code"]
3095 pub fn ext4_fs_init(
3096 fs: *mut ext4_fs,
3097 bdev: *mut ext4_blockdev,
3098 read_only: bool,
3099 ) -> ::std::os::raw::c_int;
3100}
3101unsafe extern "C" {
3102 #[doc = "@brief Destroy filesystem instance (used by unmount operation).\n @param fs Filesystem to be destroyed\n @return Error code"]
3103 pub fn ext4_fs_fini(fs: *mut ext4_fs) -> ::std::os::raw::c_int;
3104}
3105unsafe extern "C" {
3106 #[doc = "@brief Check filesystem's features, if supported by this driver\n Function can return EOK and set read_only flag. It mean's that\n there are some not-supported features, that can cause problems\n during some write operations.\n @param fs Filesystem to be checked\n @param read_only Flag if filesystem should be mounted only for reading\n @return Error code"]
3107 pub fn ext4_fs_check_features(fs: *mut ext4_fs, read_only: *mut bool) -> ::std::os::raw::c_int;
3108}
3109unsafe extern "C" {
3110 #[doc = "@brief Get reference to block group specified by index.\n @param fs Filesystem to find block group on\n @param bgid Index of block group to load\n @param ref Output pointer for reference\n @return Error code"]
3111 pub fn ext4_fs_get_block_group_ref(
3112 fs: *mut ext4_fs,
3113 bgid: u32,
3114 ref_: *mut ext4_block_group_ref,
3115 ) -> ::std::os::raw::c_int;
3116}
3117unsafe extern "C" {
3118 #[doc = "@brief Put reference to block group.\n @param ref Pointer for reference to be put back\n @return Error code"]
3119 pub fn ext4_fs_put_block_group_ref(ref_: *mut ext4_block_group_ref) -> ::std::os::raw::c_int;
3120}
3121unsafe extern "C" {
3122 #[doc = "@brief Get reference to i-node specified by index.\n @param fs Filesystem to find i-node on\n @param index Index of i-node to load\n @param ref Output pointer for reference\n @return Error code"]
3123 pub fn ext4_fs_get_inode_ref(
3124 fs: *mut ext4_fs,
3125 index: u32,
3126 ref_: *mut ext4_inode_ref,
3127 ) -> ::std::os::raw::c_int;
3128}
3129unsafe extern "C" {
3130 #[doc = "@brief Reset blocks field of i-node.\n @param fs Filesystem to reset blocks field of i-inode on\n @param inode_ref ref Pointer for inode to be operated on"]
3131 pub fn ext4_fs_inode_blocks_init(fs: *mut ext4_fs, inode_ref: *mut ext4_inode_ref);
3132}
3133unsafe extern "C" {
3134 #[doc = "@brief Put reference to i-node.\n @param ref Pointer for reference to be put back\n @return Error code"]
3135 pub fn ext4_fs_put_inode_ref(ref_: *mut ext4_inode_ref) -> ::std::os::raw::c_int;
3136}
3137unsafe extern "C" {
3138 #[doc = "@brief Convert filetype to inode mode.\n @param filetype File type\n @return inode mode"]
3139 pub fn ext4_fs_correspond_inode_mode(filetype: ::std::os::raw::c_int) -> u32;
3140}
3141unsafe extern "C" {
3142 #[doc = "@brief Allocate new i-node in the filesystem.\n @param fs Filesystem to allocated i-node on\n @param inode_ref Output pointer to return reference to allocated i-node\n @param filetype File type of newly created i-node\n @return Error code"]
3143 pub fn ext4_fs_alloc_inode(
3144 fs: *mut ext4_fs,
3145 inode_ref: *mut ext4_inode_ref,
3146 filetype: ::std::os::raw::c_int,
3147 ) -> ::std::os::raw::c_int;
3148}
3149unsafe extern "C" {
3150 #[doc = "@brief Release i-node and mark it as free.\n @param inode_ref I-node to be released\n @return Error code"]
3151 pub fn ext4_fs_free_inode(inode_ref: *mut ext4_inode_ref) -> ::std::os::raw::c_int;
3152}
3153unsafe extern "C" {
3154 #[doc = "@brief Truncate i-node data blocks.\n @param inode_ref I-node to be truncated\n @param new_size New size of inode (must be < current size)\n @return Error code"]
3155 pub fn ext4_fs_truncate_inode(
3156 inode_ref: *mut ext4_inode_ref,
3157 new_size: u64,
3158 ) -> ::std::os::raw::c_int;
3159}
3160unsafe extern "C" {
3161 #[doc = "@brief Compute 'goal' for inode index\n @param inode_ref Reference to inode, to allocate block for\n @return goal"]
3162 pub fn ext4_fs_inode_to_goal_block(inode_ref: *mut ext4_inode_ref) -> ext4_fsblk_t;
3163}
3164unsafe extern "C" {
3165 #[doc = "@brief Compute 'goal' for allocation algorithm (For blockmap).\n @param inode_ref Reference to inode, to allocate block for\n @return error code"]
3166 pub fn ext4_fs_indirect_find_goal(
3167 inode_ref: *mut ext4_inode_ref,
3168 goal: *mut ext4_fsblk_t,
3169 ) -> ::std::os::raw::c_int;
3170}
3171unsafe extern "C" {
3172 #[doc = "@brief Get physical block address by logical index of the block.\n @param inode_ref I-node to read block address from\n @param iblock Logical index of block\n @param fblock Output pointer for return physical\n block address\n @param support_unwritten Indicate whether unwritten block range\n is supported under the current context\n @return Error code"]
3173 pub fn ext4_fs_get_inode_dblk_idx(
3174 inode_ref: *mut ext4_inode_ref,
3175 iblock: ext4_lblk_t,
3176 fblock: *mut ext4_fsblk_t,
3177 support_unwritten: bool,
3178 ) -> ::std::os::raw::c_int;
3179}
3180unsafe extern "C" {
3181 #[doc = "@brief Initialize a part of unwritten range of the inode.\n @param inode_ref I-node to proceed on.\n @param iblock Logical index of block\n @param fblock Output pointer for return physical block address\n @return Error code"]
3182 pub fn ext4_fs_init_inode_dblk_idx(
3183 inode_ref: *mut ext4_inode_ref,
3184 iblock: ext4_lblk_t,
3185 fblock: *mut ext4_fsblk_t,
3186 ) -> ::std::os::raw::c_int;
3187}
3188unsafe extern "C" {
3189 #[doc = "@brief Append following logical block to the i-node.\n @param inode_ref I-node to append block to\n @param fblock Output physical block address of newly allocated block\n @param iblock Output logical number of newly allocated block\n @return Error code"]
3190 pub fn ext4_fs_append_inode_dblk(
3191 inode_ref: *mut ext4_inode_ref,
3192 fblock: *mut ext4_fsblk_t,
3193 iblock: *mut ext4_lblk_t,
3194 ) -> ::std::os::raw::c_int;
3195}
3196unsafe extern "C" {
3197 pub fn ext4_fs_insert_inode_dblk(
3198 inode_ref: *mut ext4_inode_ref,
3199 fblock: *mut ext4_fsblk_t,
3200 iblock: ext4_lblk_t,
3201 ) -> ::std::os::raw::c_int;
3202}
3203unsafe extern "C" {
3204 #[doc = "@brief Increment inode link count.\n @param inode_ref none handle"]
3205 pub fn ext4_fs_inode_links_count_inc(inode_ref: *mut ext4_inode_ref);
3206}
3207unsafe extern "C" {
3208 #[doc = "@brief Decrement inode link count.\n @param inode_ref none handle"]
3209 pub fn ext4_fs_inode_links_count_dec(inode_ref: *mut ext4_inode_ref);
3210}
3211unsafe extern "C" {
3212 #[doc = "@brief Returns a block group count.\n @param s superblock descriptor\n @return count of block groups"]
3213 pub fn ext4_block_group_cnt(s: *mut ext4_sblock) -> u32;
3214}
3215unsafe extern "C" {
3216 #[doc = "@brief Returns block count in block group\n (last block group may have less blocks)\n @param s superblock descriptor\n @param bgid block group id\n @return blocks count"]
3217 pub fn ext4_blocks_in_group_cnt(s: *mut ext4_sblock, bgid: u32) -> u32;
3218}
3219unsafe extern "C" {
3220 #[doc = "@brief Returns inodes count in block group\n (last block group may have less inodes)\n @param s superblock descriptor\n @param bgid block group id\n @return inodes count"]
3221 pub fn ext4_inodes_in_group_cnt(s: *mut ext4_sblock, bgid: u32) -> u32;
3222}
3223unsafe extern "C" {
3224 #[doc = "@brief Superblock write.\n @param bdev block device descriptor.\n @param s superblock descriptor\n @return Standard error code"]
3225 pub fn ext4_sb_write(bdev: *mut ext4_blockdev, s: *mut ext4_sblock) -> ::std::os::raw::c_int;
3226}
3227unsafe extern "C" {
3228 #[doc = "@brief Superblock read.\n @param bdev block device descriptor.\n @param s superblock descriptor\n @return Standard error code"]
3229 pub fn ext4_sb_read(bdev: *mut ext4_blockdev, s: *mut ext4_sblock) -> ::std::os::raw::c_int;
3230}
3231unsafe extern "C" {
3232 #[doc = "@brief Superblock simple validation.\n @param s superblock descriptor\n @return true if OK"]
3233 pub fn ext4_sb_check(s: *mut ext4_sblock) -> bool;
3234}
3235unsafe extern "C" {
3236 #[doc = "@brief Superblock presence in block group.\n @param s superblock descriptor\n @param block_group block group id\n @return true if block group has superblock"]
3237 pub fn ext4_sb_is_super_in_bg(s: *mut ext4_sblock, block_group: u32) -> bool;
3238}
3239unsafe extern "C" {
3240 #[doc = "@brief TODO:"]
3241 pub fn ext4_sb_sparse(group: u32) -> bool;
3242}
3243unsafe extern "C" {
3244 #[doc = "@brief TODO:"]
3245 pub fn ext4_bg_num_gdb(s: *mut ext4_sblock, group: u32) -> u32;
3246}
3247unsafe extern "C" {
3248 #[doc = "@brief TODO:"]
3249 pub fn ext4_num_base_meta_clusters(s: *mut ext4_sblock, block_group: u32) -> u32;
3250}
3251#[repr(C)]
3252#[derive(Debug, Copy, Clone)]
3253pub struct ext4_dir_iter {
3254 pub inode_ref: *mut ext4_inode_ref,
3255 pub curr_blk: ext4_block,
3256 pub curr_off: u64,
3257 pub curr: *mut ext4_dir_en,
3258}
3259#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3260const _: () = {
3261 ["Size of ext4_dir_iter"][::std::mem::size_of::<ext4_dir_iter>() - 48usize];
3262 ["Alignment of ext4_dir_iter"][::std::mem::align_of::<ext4_dir_iter>() - 8usize];
3263 ["Offset of field: ext4_dir_iter::inode_ref"]
3264 [::std::mem::offset_of!(ext4_dir_iter, inode_ref) - 0usize];
3265 ["Offset of field: ext4_dir_iter::curr_blk"]
3266 [::std::mem::offset_of!(ext4_dir_iter, curr_blk) - 8usize];
3267 ["Offset of field: ext4_dir_iter::curr_off"]
3268 [::std::mem::offset_of!(ext4_dir_iter, curr_off) - 32usize];
3269 ["Offset of field: ext4_dir_iter::curr"][::std::mem::offset_of!(ext4_dir_iter, curr) - 40usize];
3270};
3271#[repr(C)]
3272#[derive(Debug, Copy, Clone)]
3273pub struct ext4_dir_search_result {
3274 pub block: ext4_block,
3275 pub dentry: *mut ext4_dir_en,
3276}
3277#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3278const _: () = {
3279 ["Size of ext4_dir_search_result"][::std::mem::size_of::<ext4_dir_search_result>() - 32usize];
3280 ["Alignment of ext4_dir_search_result"]
3281 [::std::mem::align_of::<ext4_dir_search_result>() - 8usize];
3282 ["Offset of field: ext4_dir_search_result::block"]
3283 [::std::mem::offset_of!(ext4_dir_search_result, block) - 0usize];
3284 ["Offset of field: ext4_dir_search_result::dentry"]
3285 [::std::mem::offset_of!(ext4_dir_search_result, dentry) - 24usize];
3286};
3287unsafe extern "C" {
3288 #[doc = "@brief Verify checksum of a linear directory leaf block\n @param inode_ref Directory i-node\n @param dirent Linear directory leaf block\n @return true means the block passed checksum verification"]
3289 pub fn ext4_dir_csum_verify(inode_ref: *mut ext4_inode_ref, dirent: *mut ext4_dir_en) -> bool;
3290}
3291unsafe extern "C" {
3292 #[doc = "@brief Initialize directory iterator.\n Set position to the first valid entry from the required position.\n @param it Pointer to iterator to be initialized\n @param inode_ref Directory i-node\n @param pos Position to start reading entries from\n @return Error code"]
3293 pub fn ext4_dir_iterator_init(
3294 it: *mut ext4_dir_iter,
3295 inode_ref: *mut ext4_inode_ref,
3296 pos: u64,
3297 ) -> ::std::os::raw::c_int;
3298}
3299unsafe extern "C" {
3300 #[doc = "@brief Jump to the next valid entry\n @param it Initialized iterator\n @return Error code"]
3301 pub fn ext4_dir_iterator_next(it: *mut ext4_dir_iter) -> ::std::os::raw::c_int;
3302}
3303unsafe extern "C" {
3304 #[doc = "@brief Uninitialize directory iterator.\n Release all allocated structures.\n @param it Iterator to be finished\n @return Error code"]
3305 pub fn ext4_dir_iterator_fini(it: *mut ext4_dir_iter) -> ::std::os::raw::c_int;
3306}
3307unsafe extern "C" {
3308 #[doc = "@brief Write directory entry to concrete data block.\n @param sb Superblock\n @param en Pointer to entry to be written\n @param entry_len Length of new entry\n @param child Child i-node to be written to new entry\n @param name Name of the new entry\n @param name_len Length of entry name"]
3309 pub fn ext4_dir_write_entry(
3310 sb: *mut ext4_sblock,
3311 en: *mut ext4_dir_en,
3312 entry_len: u16,
3313 child: *mut ext4_inode_ref,
3314 name: *const ::std::os::raw::c_char,
3315 name_len: usize,
3316 );
3317}
3318unsafe extern "C" {
3319 #[doc = "@brief Add new entry to the directory.\n @param parent Directory i-node\n @param name Name of new entry\n @param child I-node to be referenced from new entry\n @return Error code"]
3320 pub fn ext4_dir_add_entry(
3321 parent: *mut ext4_inode_ref,
3322 name: *const ::std::os::raw::c_char,
3323 name_len: u32,
3324 child: *mut ext4_inode_ref,
3325 ) -> ::std::os::raw::c_int;
3326}
3327unsafe extern "C" {
3328 #[doc = "@brief Find directory entry with passed name.\n @param result Result structure to be returned if entry found\n @param parent Directory i-node\n @param name Name of entry to be found\n @param name_len Name length\n @return Error code"]
3329 pub fn ext4_dir_find_entry(
3330 result: *mut ext4_dir_search_result,
3331 parent: *mut ext4_inode_ref,
3332 name: *const ::std::os::raw::c_char,
3333 name_len: u32,
3334 ) -> ::std::os::raw::c_int;
3335}
3336unsafe extern "C" {
3337 #[doc = "@brief Remove directory entry.\n @param parent Directory i-node\n @param name Name of the entry to be removed\n @param name_len Name length\n @return Error code"]
3338 pub fn ext4_dir_remove_entry(
3339 parent: *mut ext4_inode_ref,
3340 name: *const ::std::os::raw::c_char,
3341 name_len: u32,
3342 ) -> ::std::os::raw::c_int;
3343}
3344unsafe extern "C" {
3345 #[doc = "@brief Try to insert entry to concrete data block.\n @param sb Superblock\n @param inode_ref Directory i-node\n @param dst_blk Block to try to insert entry to\n @param child Child i-node to be inserted by new entry\n @param name Name of the new entry\n @param name_len Length of the new entry name\n @return Error code"]
3346 pub fn ext4_dir_try_insert_entry(
3347 sb: *mut ext4_sblock,
3348 inode_ref: *mut ext4_inode_ref,
3349 dst_blk: *mut ext4_block,
3350 child: *mut ext4_inode_ref,
3351 name: *const ::std::os::raw::c_char,
3352 name_len: u32,
3353 ) -> ::std::os::raw::c_int;
3354}
3355unsafe extern "C" {
3356 #[doc = "@brief Try to find entry in block by name.\n @param block Block containing entries\n @param sb Superblock\n @param name_len Length of entry name\n @param name Name of entry to be found\n @param res_entry Output pointer to found entry, NULL if not found\n @return Error code"]
3357 pub fn ext4_dir_find_in_block(
3358 block: *mut ext4_block,
3359 sb: *mut ext4_sblock,
3360 name_len: usize,
3361 name: *const ::std::os::raw::c_char,
3362 res_entry: *mut *mut ext4_dir_en,
3363 ) -> ::std::os::raw::c_int;
3364}
3365unsafe extern "C" {
3366 #[doc = "@brief Simple function to release allocated data from result.\n @param parent Parent inode\n @param result Search result to destroy\n @return Error code\n"]
3367 pub fn ext4_dir_destroy_result(
3368 parent: *mut ext4_inode_ref,
3369 result: *mut ext4_dir_search_result,
3370 ) -> ::std::os::raw::c_int;
3371}
3372unsafe extern "C" {
3373 pub fn ext4_dir_set_csum(inode_ref: *mut ext4_inode_ref, dirent: *mut ext4_dir_en);
3374}
3375unsafe extern "C" {
3376 pub fn ext4_dir_init_entry_tail(t: *mut ext4_dir_entry_tail);
3377}
3378unsafe extern "C" {
3379 #[doc = "@brief Get mode of the i-node.\n @param sb Superblock\n @param inode I-node to load mode from\n @return Mode of the i-node"]
3380 pub fn ext4_inode_get_mode(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> u32;
3381}
3382unsafe extern "C" {
3383 #[doc = "@brief Set mode of the i-node.\n @param sb Superblock\n @param inode I-node to set mode to\n @param mode Mode to set to i-node"]
3384 pub fn ext4_inode_set_mode(sb: *mut ext4_sblock, inode: *mut ext4_inode, mode: u32);
3385}
3386unsafe extern "C" {
3387 #[doc = "@brief Get ID of the i-node owner (user id).\n @param inode I-node to load uid from\n @return User ID of the i-node owner"]
3388 pub fn ext4_inode_get_uid(inode: *mut ext4_inode) -> u32;
3389}
3390unsafe extern "C" {
3391 #[doc = "@brief Set ID of the i-node owner.\n @param inode I-node to set uid to\n @param uid ID of the i-node owner"]
3392 pub fn ext4_inode_set_uid(inode: *mut ext4_inode, uid: u32);
3393}
3394unsafe extern "C" {
3395 #[doc = "@brief Get real i-node size.\n @param sb Superblock\n @param inode I-node to load size from\n @return Real size of i-node"]
3396 pub fn ext4_inode_get_size(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> u64;
3397}
3398unsafe extern "C" {
3399 #[doc = "@brief Set real i-node size.\n @param inode I-node to set size to\n @param size Size of the i-node"]
3400 pub fn ext4_inode_set_size(inode: *mut ext4_inode, size: u64);
3401}
3402unsafe extern "C" {
3403 #[doc = "@brief Get time, when i-node was last accessed.\n @param inode I-node\n @return Time of the last access (POSIX)"]
3404 pub fn ext4_inode_get_access_time(inode: *mut ext4_inode) -> u32;
3405}
3406unsafe extern "C" {
3407 #[doc = "@brief Set time, when i-node was last accessed.\n @param inode I-node\n @param time Time of the last access (POSIX)"]
3408 pub fn ext4_inode_set_access_time(inode: *mut ext4_inode, time: u32);
3409}
3410unsafe extern "C" {
3411 #[doc = "@brief Get extra time, when i-node was last accessed.\n @param inode I-node\n @return Time of the last access (POSIX)"]
3412 pub fn ext4_inode_get_extra_access_time(inode: *mut ext4_inode) -> u32;
3413}
3414unsafe extern "C" {
3415 #[doc = "@brief Set extra time, when i-node was last accessed.\n @param inode I-node\n @param time Time of the last access (POSIX)"]
3416 pub fn ext4_inode_set_extra_access_time(inode: *mut ext4_inode, time: u32);
3417}
3418unsafe extern "C" {
3419 #[doc = "@brief Get time, when i-node was last changed.\n @param inode I-node\n @return Time of the last change (POSIX)"]
3420 pub fn ext4_inode_get_change_inode_time(inode: *mut ext4_inode) -> u32;
3421}
3422unsafe extern "C" {
3423 #[doc = "@brief Set time, when i-node was last changed.\n @param inode I-node\n @param time Time of the last change (POSIX)"]
3424 pub fn ext4_inode_set_change_inode_time(inode: *mut ext4_inode, time: u32);
3425}
3426unsafe extern "C" {
3427 #[doc = "@brief Get extra time, when i-node was last changed.\n @param inode I-node\n @return Time of the last change (POSIX)"]
3428 pub fn ext4_inode_get_extra_change_inode_time(inode: *mut ext4_inode) -> u32;
3429}
3430unsafe extern "C" {
3431 #[doc = "@brief Set extra time, when i-node was last changed.\n @param inode I-node\n @param time Time of the last change (POSIX)"]
3432 pub fn ext4_inode_set_extra_change_inode_time(inode: *mut ext4_inode, time: u32);
3433}
3434unsafe extern "C" {
3435 #[doc = "@brief Get time, when i-node content was last modified.\n @param inode I-node\n @return Time of the last content modification (POSIX)"]
3436 pub fn ext4_inode_get_modif_time(inode: *mut ext4_inode) -> u32;
3437}
3438unsafe extern "C" {
3439 #[doc = "@brief Set time, when i-node content was last modified.\n @param inode I-node\n @param time Time of the last content modification (POSIX)"]
3440 pub fn ext4_inode_set_modif_time(inode: *mut ext4_inode, time: u32);
3441}
3442unsafe extern "C" {
3443 #[doc = "@brief Get extra time, when i-node content was last modified.\n @param inode I-node\n @return Time of the last content modification (POSIX)"]
3444 pub fn ext4_inode_get_extra_modif_time(inode: *mut ext4_inode) -> u32;
3445}
3446unsafe extern "C" {
3447 #[doc = "@brief Set extra time, when i-node content was last modified.\n @param inode I-node\n @param time Time of the last content modification (POSIX)"]
3448 pub fn ext4_inode_set_extra_modif_time(inode: *mut ext4_inode, time: u32);
3449}
3450unsafe extern "C" {
3451 #[doc = "@brief Get time, when i-node was deleted.\n @param inode I-node\n @return Time of the delete action (POSIX)"]
3452 pub fn ext4_inode_get_del_time(inode: *mut ext4_inode) -> u32;
3453}
3454unsafe extern "C" {
3455 #[doc = "@brief Set time, when i-node was deleted.\n @param inode I-node\n @param time Time of the delete action (POSIX)"]
3456 pub fn ext4_inode_set_del_time(inode: *mut ext4_inode, time: u32);
3457}
3458unsafe extern "C" {
3459 #[doc = "@brief Get ID of the i-node owner's group.\n @param inode I-node to load gid from\n @return Group ID of the i-node owner"]
3460 pub fn ext4_inode_get_gid(inode: *mut ext4_inode) -> u32;
3461}
3462unsafe extern "C" {
3463 #[doc = "@brief Set ID to the i-node owner's group.\n @param inode I-node to set gid to\n @param gid Group ID of the i-node owner"]
3464 pub fn ext4_inode_set_gid(inode: *mut ext4_inode, gid: u32);
3465}
3466unsafe extern "C" {
3467 #[doc = "@brief Get number of links to i-node.\n @param inode I-node to load number of links from\n @return Number of links to i-node"]
3468 pub fn ext4_inode_get_links_cnt(inode: *mut ext4_inode) -> u16;
3469}
3470unsafe extern "C" {
3471 #[doc = "@brief Set number of links to i-node.\n @param inode I-node to set number of links to\n @param cnt Number of links to i-node"]
3472 pub fn ext4_inode_set_links_cnt(inode: *mut ext4_inode, cnt: u16);
3473}
3474unsafe extern "C" {
3475 #[doc = "@brief Get number of 512-bytes blocks used for i-node.\n @param sb Superblock\n @param inode I-node\n @return Number of 512-bytes blocks"]
3476 pub fn ext4_inode_get_blocks_count(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> u64;
3477}
3478unsafe extern "C" {
3479 #[doc = "@brief Set number of 512-bytes blocks used for i-node.\n @param sb Superblock\n @param inode I-node\n @param cnt Number of 512-bytes blocks\n @return Error code"]
3480 pub fn ext4_inode_set_blocks_count(
3481 sb: *mut ext4_sblock,
3482 inode: *mut ext4_inode,
3483 cnt: u64,
3484 ) -> ::std::os::raw::c_int;
3485}
3486unsafe extern "C" {
3487 #[doc = "@brief Get flags (features) of i-node.\n @param inode I-node to get flags from\n @return Flags (bitmap)"]
3488 pub fn ext4_inode_get_flags(inode: *mut ext4_inode) -> u32;
3489}
3490unsafe extern "C" {
3491 #[doc = "@brief Set flags (features) of i-node.\n @param inode I-node to set flags to\n @param flags Flags to set to i-node"]
3492 pub fn ext4_inode_set_flags(inode: *mut ext4_inode, flags: u32);
3493}
3494unsafe extern "C" {
3495 #[doc = "@brief Get file generation (used by NFS).\n @param inode I-node\n @return File generation"]
3496 pub fn ext4_inode_get_generation(inode: *mut ext4_inode) -> u32;
3497}
3498unsafe extern "C" {
3499 #[doc = "@brief Set file generation (used by NFS).\n @param inode I-node\n @param gen File generation"]
3500 pub fn ext4_inode_set_generation(inode: *mut ext4_inode, gen_: u32);
3501}
3502unsafe extern "C" {
3503 #[doc = "@brief Get extra I-node size field.\n @param sb Superblock\n @param inode I-node\n @return extra I-node size"]
3504 pub fn ext4_inode_get_extra_isize(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> u16;
3505}
3506unsafe extern "C" {
3507 #[doc = "@brief Set extra I-node size field.\n @param sb Superblock\n @param inode I-node\n @param size extra I-node size"]
3508 pub fn ext4_inode_set_extra_isize(sb: *mut ext4_sblock, inode: *mut ext4_inode, size: u16);
3509}
3510unsafe extern "C" {
3511 #[doc = "@brief Get address of block, where are extended attributes located.\n @param inode I-node\n @param sb Superblock\n @return Block address"]
3512 pub fn ext4_inode_get_file_acl(inode: *mut ext4_inode, sb: *mut ext4_sblock) -> u64;
3513}
3514unsafe extern "C" {
3515 #[doc = "@brief Set address of block, where are extended attributes located.\n @param inode I-node\n @param sb Superblock\n @param acl Block address"]
3516 pub fn ext4_inode_set_file_acl(inode: *mut ext4_inode, sb: *mut ext4_sblock, acl: u64);
3517}
3518unsafe extern "C" {
3519 #[doc = "@brief Get block address of specified direct block.\n @param inode I-node to load block from\n @param idx Index of logical block\n @return Physical block address"]
3520 pub fn ext4_inode_get_direct_block(inode: *mut ext4_inode, idx: u32) -> u32;
3521}
3522unsafe extern "C" {
3523 #[doc = "@brief Set block address of specified direct block.\n @param inode I-node to set block address to\n @param idx Index of logical block\n @param block Physical block address"]
3524 pub fn ext4_inode_set_direct_block(inode: *mut ext4_inode, idx: u32, block: u32);
3525}
3526unsafe extern "C" {
3527 #[doc = "@brief Get block address of specified indirect block.\n @param inode I-node to get block address from\n @param idx Index of indirect block\n @return Physical block address"]
3528 pub fn ext4_inode_get_indirect_block(inode: *mut ext4_inode, idx: u32) -> u32;
3529}
3530unsafe extern "C" {
3531 #[doc = "@brief Set block address of specified indirect block.\n @param inode I-node to set block address to\n @param idx Index of indirect block\n @param block Physical block address"]
3532 pub fn ext4_inode_set_indirect_block(inode: *mut ext4_inode, idx: u32, block: u32);
3533}
3534unsafe extern "C" {
3535 #[doc = "@brief Get device number\n @param inode I-node to get device number from\n @return Device number"]
3536 pub fn ext4_inode_get_dev(inode: *mut ext4_inode) -> u32;
3537}
3538unsafe extern "C" {
3539 #[doc = "@brief Set device number\n @param inode I-node to set device number to\n @param dev Device number"]
3540 pub fn ext4_inode_set_dev(inode: *mut ext4_inode, dev: u32);
3541}
3542unsafe extern "C" {
3543 #[doc = "@brief return the type of i-node\n @param sb Superblock\n @param inode I-node to return the type of\n @return Result of check operation"]
3544 pub fn ext4_inode_type(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> u32;
3545}
3546unsafe extern "C" {
3547 #[doc = "@brief Check if i-node has specified type.\n @param sb Superblock\n @param inode I-node to check type of\n @param type Type to check\n @return Result of check operation"]
3548 pub fn ext4_inode_is_type(sb: *mut ext4_sblock, inode: *mut ext4_inode, type_: u32) -> bool;
3549}
3550unsafe extern "C" {
3551 #[doc = "@brief Check if i-node has specified flag.\n @param inode I-node to check flags of\n @param f Flag to check\n @return Result of check operation"]
3552 pub fn ext4_inode_has_flag(inode: *mut ext4_inode, f: u32) -> bool;
3553}
3554unsafe extern "C" {
3555 #[doc = "@brief Remove specified flag from i-node.\n @param inode I-node to clear flag on\n @param f Flag to be cleared"]
3556 pub fn ext4_inode_clear_flag(inode: *mut ext4_inode, f: u32);
3557}
3558unsafe extern "C" {
3559 #[doc = "@brief Set specified flag to i-node.\n @param inode I-node to set flag on\n @param f Flag to be set"]
3560 pub fn ext4_inode_set_flag(inode: *mut ext4_inode, f: u32);
3561}
3562unsafe extern "C" {
3563 #[doc = "@brief Get inode checksum(crc32)\n @param sb Superblock\n @param inode I-node to get checksum value from"]
3564 pub fn ext4_inode_get_csum(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> u32;
3565}
3566unsafe extern "C" {
3567 #[doc = "@brief Get inode checksum(crc32)\n @param sb Superblock\n @param inode I-node to get checksum value from"]
3568 pub fn ext4_inode_set_csum(sb: *mut ext4_sblock, inode: *mut ext4_inode, checksum: u32);
3569}
3570unsafe extern "C" {
3571 #[doc = "@brief Check if i-node can be truncated.\n @param sb Superblock\n @param inode I-node to check\n @return Result of the check operation"]
3572 pub fn ext4_inode_can_truncate(sb: *mut ext4_sblock, inode: *mut ext4_inode) -> bool;
3573}
3574#[repr(C)]
3575#[derive(Debug, Copy, Clone)]
3576pub struct ext4_extent_header {
3577 _unused: [u8; 0],
3578}
3579unsafe extern "C" {
3580 #[doc = "@brief Get extent header from the root of the extent tree.\n @param inode I-node to get extent header from\n @return Pointer to extent header of the root node"]
3581 pub fn ext4_inode_get_extent_header(inode: *mut ext4_inode) -> *mut ext4_extent_header;
3582}
3583unsafe extern "C" {
3584 pub fn ext4_extent_tree_init(inode_ref: *mut ext4_inode_ref);
3585}
3586unsafe extern "C" {
3587 pub fn ext4_extent_get_blocks(
3588 inode_ref: *mut ext4_inode_ref,
3589 iblock: ext4_lblk_t,
3590 max_blocks: u32,
3591 result: *mut ext4_fsblk_t,
3592 create: bool,
3593 blocks_count: *mut u32,
3594 ) -> ::std::os::raw::c_int;
3595}
3596unsafe extern "C" {
3597 #[doc = "@brief Release all data blocks starting from specified logical block.\n @param inode_ref I-node to release blocks from\n @param iblock_from First logical block to release\n @return Error code"]
3598 pub fn ext4_extent_remove_space(
3599 inode_ref: *mut ext4_inode_ref,
3600 from: ext4_lblk_t,
3601 to: ext4_lblk_t,
3602 ) -> ::std::os::raw::c_int;
3603}
3604pub type __builtin_va_list = [__va_list_tag; 1usize];
3605#[repr(C)]
3606#[derive(Debug, Copy, Clone)]
3607pub struct __va_list_tag {
3608 pub gp_offset: ::std::os::raw::c_uint,
3609 pub fp_offset: ::std::os::raw::c_uint,
3610 pub overflow_arg_area: *mut ::std::os::raw::c_void,
3611 pub reg_save_area: *mut ::std::os::raw::c_void,
3612}
3613#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3614const _: () = {
3615 ["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize];
3616 ["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize];
3617 ["Offset of field: __va_list_tag::gp_offset"]
3618 [::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize];
3619 ["Offset of field: __va_list_tag::fp_offset"]
3620 [::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize];
3621 ["Offset of field: __va_list_tag::overflow_arg_area"]
3622 [::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize];
3623 ["Offset of field: __va_list_tag::reg_save_area"]
3624 [::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize];
3625};
3626#[repr(C)]
3627#[derive(Debug, Copy, Clone)]
3628pub struct jbd_fs {
3629 pub _address: u8,
3630}
3631#[repr(C)]
3632#[derive(Debug, Copy, Clone)]
3633pub struct jbd_journal {
3634 pub _address: u8,
3635}
3636#[repr(C)]
3637#[derive(Debug, Copy, Clone)]
3638pub struct jbd_trans {
3639 pub _address: u8,
3640}