diff options
author | Rukai <rubickent@gmail.com> | 2018-09-10 22:48:41 +1000 |
---|---|---|
committer | Lucas Kent <rubickent@gmail.com> | 2018-10-18 08:31:20 +1100 |
commit | dc41be48a7d0eca700205d9fa585690305ad26d5 (patch) | |
tree | 2418fe3f323bbe2aaec486f4d7fb06345c992ab2 /src/sys | |
parent | a063625c766e84dd5ef510935f50264b6c986abf (diff) | |
download | nix-dc41be48a7d0eca700205d9fa585690305ad26d5.zip |
Document ioctl_param_type
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/ioctl/mod.rs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/sys/ioctl/mod.rs b/src/sys/ioctl/mod.rs index e00e5934..35d508b1 100644 --- a/src/sys/ioctl/mod.rs +++ b/src/sys/ioctl/mod.rs @@ -221,7 +221,6 @@ //! //! # fn main() {} //! ``` -//! #[cfg(any(target_os = "android", target_os = "linux"))] #[macro_use] mod linux; @@ -502,9 +501,13 @@ cfg_if!{ /// The generated function has the following signature: /// /// ```rust,ignore - /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: libc::c_int) -> Result<libc::c_int> + /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: nix::sys::ioctl::ioctl_param_type) -> Result<libc::c_int> /// ``` /// + /// `nix::sys::ioctl::ioctl_param_type` depends on the OS: + /// * BSD - `libc::c_int` + /// * Linux - `libc::c_ulong` + /// /// For a more in-depth explanation of ioctls, see [`::sys::ioctl`](sys/ioctl/index.html). /// /// # Example @@ -537,9 +540,13 @@ cfg_if!{ /// The generated function has the following signature: /// /// ```rust,ignore - /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: libc::c_int) -> Result<libc::c_int> + /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: nix::sys::ioctl::ioctl_param_type) -> Result<libc::c_int> /// ``` /// + /// `nix::sys::ioctl::ioctl_param_type` depends on the OS: + /// * BSD - `libc::c_int` + /// * Linux - `libc::c_ulong` + /// /// For a more in-depth explanation of ioctls, see [`::sys::ioctl`](sys/ioctl/index.html). /// /// # Example @@ -655,7 +662,7 @@ macro_rules! ioctl_readwrite { /// /// The generated function has the following signature: /// -/// ```rust,ignorerust,ignore +/// ```rust,ignore /// pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: *mut DATA_TYPE) -> Result<libc::c_int> /// ``` /// |