lib.rs 981 B

12345678910111213141516171819202122232425262728293031323334
  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::undocumented_unsafe_blocks,
  16. dead_code,
  17. missing_docs,
  18. non_camel_case_types,
  19. non_upper_case_globals,
  20. non_snake_case,
  21. improper_ctypes,
  22. unreachable_pub,
  23. unsafe_op_in_unsafe_fn
  24. )]
  25. #![cfg_attr(CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES, allow(unnecessary_transmutes))]
  26. // Manual definition of blocklisted types.
  27. type __kernel_size_t = usize;
  28. type __kernel_ssize_t = isize;
  29. type __kernel_ptrdiff_t = isize;
  30. include!(concat!(env!("OBJTREE"), "/rust/uapi/uapi_generated.rs"));