diff options
author | Bryant Mairs <bryant@mai.rs> | 2017-07-11 11:38:14 -0700 |
---|---|---|
committer | Bryant Mairs <bryant@mai.rs> | 2017-07-19 07:19:26 -0700 |
commit | 850b370fbea50614b056d31755cba0f8d706c7dc (patch) | |
tree | 499c998deefb3003ab9944c7b2263ea915440ad5 /src/sys/ioctl/platform/bsd.rs | |
parent | 7e2bbdc75ab335ee4c34f8ed4a8d507663080a10 (diff) | |
download | nix-850b370fbea50614b056d31755cba0f8d706c7dc.zip |
Hide internal macros/types within ioctl
Diffstat (limited to 'src/sys/ioctl/platform/bsd.rs')
-rw-r--r-- | src/sys/ioctl/platform/bsd.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sys/ioctl/platform/bsd.rs b/src/sys/ioctl/platform/bsd.rs index 57b4d637..df3716b9 100644 --- a/src/sys/ioctl/platform/bsd.rs +++ b/src/sys/ioctl/platform/bsd.rs @@ -1,14 +1,20 @@ mod consts { + #[doc(hidden)] pub const VOID: u32 = 0x20000000; + #[doc(hidden)] pub const OUT: u32 = 0x40000000; + #[doc(hidden)] pub const IN: u32 = 0x80000000; + #[doc(hidden)] pub const INOUT: u32 = (IN|OUT); + #[doc(hidden)] pub const IOCPARM_MASK: u32 = 0x1fff; } pub use self::consts::*; #[macro_export] +#[doc(hidden)] macro_rules! ioc { ($inout:expr, $group:expr, $num:expr, $len:expr) => ( $inout | (($len as u32 & $crate::sys::ioctl::IOCPARM_MASK) << 16) | (($group as u32) << 8) | ($num as u32) @@ -16,21 +22,25 @@ macro_rules! ioc { } #[macro_export] +#[doc(hidden)] macro_rules! io { ($g:expr, $n:expr) => (ioc!($crate::sys::ioctl::VOID, $g, $n, 0)) } #[macro_export] +#[doc(hidden)] macro_rules! ior { ($g:expr, $n:expr, $len:expr) => (ioc!($crate::sys::ioctl::OUT, $g, $n, $len)) } #[macro_export] +#[doc(hidden)] macro_rules! iow { ($g:expr, $n:expr, $len:expr) => (ioc!($crate::sys::ioctl::IN, $g, $n, $len)) } #[macro_export] +#[doc(hidden)] macro_rules! iorw { ($g:expr, $n:expr, $len:expr) => (ioc!($crate::sys::ioctl::INOUT, $g, $n, $len)) } |