summaryrefslogtreecommitdiff
path: root/src/sys/ioctl
diff options
context:
space:
mode:
authorBryant Mairs <bryant@mai.rs>2019-05-24 16:51:56 -0700
committerBryant Mairs <bryant@mai.rs>2019-05-24 16:55:07 -0700
commit62f35c2648bc27645e0d6bffa55cf657829bfd03 (patch)
treee14764c711349c249ceed46060605fed28c53192 /src/sys/ioctl
parent4a2fcbaf0d10cfd7b1857c8577386ede8bfb6e54 (diff)
downloadnix-62f35c2648bc27645e0d6bffa55cf657829bfd03.zip
Allow import of Linux macros in Rust2018
Finish off the work started in 8c9ac5a70 allowing the use of macros without needing to import local inner macros.
Diffstat (limited to 'src/sys/ioctl')
-rw-r--r--src/sys/ioctl/linux.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sys/ioctl/linux.rs b/src/sys/ioctl/linux.rs
index 750a1c98..9cdac72a 100644
--- a/src/sys/ioctl/linux.rs
+++ b/src/sys/ioctl/linux.rs
@@ -93,7 +93,7 @@ macro_rules! ioc {
/// ioctl_write_int_bad!(kvm_create_vm, request_code_none!(KVMIO, 0x03));
/// # fn main() {}
/// ```
-#[macro_export]
+#[macro_export(local_inner_macros)]
macro_rules! request_code_none {
($ty:expr, $nr:expr) => (ioc!($crate::sys::ioctl::NONE, $ty, $nr, 0))
}
@@ -108,7 +108,7 @@ macro_rules! request_code_none {
/// The read/write direction is relative to userland, so this
/// command would be userland is reading and the kernel is
/// writing.
-#[macro_export]
+#[macro_export(local_inner_macros)]
macro_rules! request_code_read {
($ty:expr, $nr:expr, $sz:expr) => (ioc!($crate::sys::ioctl::READ, $ty, $nr, $sz))
}
@@ -123,7 +123,7 @@ macro_rules! request_code_read {
/// The read/write direction is relative to userland, so this
/// command would be userland is writing and the kernel is
/// reading.
-#[macro_export]
+#[macro_export(local_inner_macros)]
macro_rules! request_code_write {
($ty:expr, $nr:expr, $sz:expr) => (ioc!($crate::sys::ioctl::WRITE, $ty, $nr, $sz))
}
@@ -134,7 +134,7 @@ macro_rules! request_code_write {
///
/// You should only use this macro directly if the `ioctl` you're working
/// with is "bad" and you cannot use `ioctl_readwrite!()` directly.
-#[macro_export]
+#[macro_export(local_inner_macros)]
macro_rules! request_code_readwrite {
($ty:expr, $nr:expr, $sz:expr) => (ioc!($crate::sys::ioctl::READ | $crate::sys::ioctl::WRITE, $ty, $nr, $sz))
}