| 1 | |
| 2 |
|
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 |
|
| 11 | #![no_std]
|
| 12 | #![allow(
|
| 13 | clippy::all,
|
| 14 | missing_docs,
|
| 15 | non_camel_case_types,
|
| 16 | non_upper_case_globals,
|
| 17 | non_snake_case,
|
| 18 | improper_ctypes,
|
| 19 | unreachable_pub,
|
| 20 | unsafe_op_in_unsafe_fn
|
| 21 | )]
|
| 22 | #![feature(cfi_encoding)]
|
| 23 |
|
| 24 | #[allow(dead_code)]
|
| 25 | #[allow(clippy::as_underscore)]
|
| 26 | #[allow(clippy::cast_lossless)]
|
| 27 | #[allow(clippy::ptr_as_ptr)]
|
| 28 | #[allow(clippy::ref_as_ptr)]
|
| 29 | #[allow(clippy::undocumented_unsafe_blocks)]
|
| 30 | #[cfg_attr(not(CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES), allow(unknown_lints))]
|
| 31 | #[allow(unnecessary_transmutes)]
|
| 32 | #[cfg_attr(
|
| 33 | CONFIG_RUSTC_HAS_SUSPICIOUS_RUNTIME_SYMBOL_DEFINITIONS,
|
| 34 | allow(suspicious_runtime_symbol_definitions)
|
| 35 | )]
|
| 36 | mod bindings_raw {
|
| 37 | use pin_init::{MaybeZeroable, Zeroable};
|
| 38 |
|
| 39 | |
| 40 | type __kernel_size_t = usize;
|
| 41 | type __kernel_ssize_t = isize;
|
| 42 | type __kernel_ptrdiff_t = isize;
|
| 43 |
|
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | unsafe impl<Storage> Zeroable for __BindgenBitfieldUnit<Storage> where Storage: Zeroable {}
|
| 49 |
|
| 50 | |
| 51 | |
| 52 | pub use super::bindings_helper::*;
|
| 53 | include!(concat!(
|
| 54 | env!("OBJTREE"),
|
| 55 | "/rust/bindings/bindings_generated.rs"
|
| 56 | ));
|
| 57 | }
|
| 58 |
|
| 59 | |
| 60 | |
| 61 | |
| 62 | #[allow(dead_code)]
|
| 63 | mod bindings_helper {
|
| 64 | |
| 65 | use super::bindings_raw::*;
|
| 66 | include!(concat!(
|
| 67 | env!("OBJTREE"),
|
| 68 | "/rust/bindings/bindings_helpers_generated.rs"
|
| 69 | ));
|
| 70 | }
|
| 71 |
|
| 72 | pub use bindings_raw::*;
|
| 73 |
|
| 74 | pub const compat_ptr_ioctl: Option<
|
| 75 | unsafe extern "C" fn(*mut file, ffi::c_uint, ffi::c_ulong) -> ffi::c_long,
|
| 76 | > = {
|
| 77 | #[cfg(CONFIG_COMPAT)]
|
| 78 | {
|
| 79 | Some(bindings_raw::compat_ptr_ioctl)
|
| 80 | }
|
| 81 | #[cfg(not(CONFIG_COMPAT))]
|
| 82 | {
|
| 83 | None
|
| 84 | }
|
| 85 | };
|