lib.rs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // SPDX-License-Identifier: GPL-2.0
  2. //! UAPI Bindings.
  3. //!
  4. //! Contains the bindings generated by `bindgen` for UAPI interfaces.
  5. //!
  6. //! This crate may be used directly by drivers that need to interact with
  7. //! userspace APIs.
  8. #![no_std]
  9. // See <https://github.com/rust-lang/rust-bindgen/issues/1651>.
  10. #![cfg_attr(test, allow(deref_nullptr))]
  11. #![cfg_attr(test, allow(unaligned_references))]
  12. #![cfg_attr(test, allow(unsafe_op_in_unsafe_fn))]
  13. #![allow(
  14. clippy::all,
  15. clippy::cast_lossless,
  16. clippy::ptr_as_ptr,
  17. clippy::ref_as_ptr,
  18. clippy::undocumented_unsafe_blocks,
  19. dead_code,
  20. missing_docs,
  21. non_camel_case_types,
  22. non_upper_case_globals,
  23. non_snake_case,
  24. improper_ctypes,
  25. unreachable_pub,
  26. unsafe_op_in_unsafe_fn
  27. )]
  28. #![cfg_attr(CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES, allow(unnecessary_transmutes))]
  29. // Manual definition of blocklisted types.
  30. type __kernel_size_t = usize;
  31. type __kernel_ssize_t = isize;
  32. type __kernel_ptrdiff_t = isize;
  33. use pin_init::MaybeZeroable;
  34. include!(concat!(env!("OBJTREE"), "/rust/uapi/uapi_generated.rs"));