diff options
author | Bryant Mairs <bryant@mai.rs> | 2017-07-11 11:36:15 -0700 |
---|---|---|
committer | Marcin Mielniczuk <marmistrz.dev@zoho.eu> | 2017-07-25 09:09:52 +0200 |
commit | 1b9a779333df43e33c3c77f286aed64682001ffe (patch) | |
tree | 6312315428b265edc2df2589e0bd18902147e548 | |
parent | 8928a7d1374bdd12bd52d04f4afc0ba2704f1285 (diff) | |
download | nix-1b9a779333df43e33c3c77f286aed64682001ffe.zip |
Re-add bad variant of ioctl!
-rw-r--r-- | src/sys/ioctl/mod.rs | 2 | ||||
-rw-r--r-- | test/sys/test_ioctl.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/sys/ioctl/mod.rs b/src/sys/ioctl/mod.rs index b5e1709d..b3388c28 100644 --- a/src/sys/ioctl/mod.rs +++ b/src/sys/ioctl/mod.rs @@ -130,7 +130,7 @@ macro_rules! convert_ioctl_res { #[macro_export] macro_rules! ioctl { - ($name:ident with $nr:expr) => ( + (bad $name:ident with $nr:expr) => ( pub unsafe fn $name(fd: $crate::sys::ioctl::libc::c_int, data: *mut u8) -> $crate::Result<$crate::sys::ioctl::libc::c_int> { diff --git a/test/sys/test_ioctl.rs b/test/sys/test_ioctl.rs index 55b61fd7..8a5b8a12 100644 --- a/test/sys/test_ioctl.rs +++ b/test/sys/test_ioctl.rs @@ -1,7 +1,7 @@ #![allow(dead_code)] // Simple tests to ensure macro generated fns compile -ioctl!(do_bad with 0x1234); +ioctl!(bad do_bad with 0x1234); ioctl!(none do_none with 0, 0); ioctl!(read read_test with 0, 0; u32); ioctl!(write write_test with 0, 0; u64); @@ -82,7 +82,7 @@ mod linux { #[test] fn test_op_read_write_64() { assert_eq!(iorw!(b'z', 10, (1 as u64) << 32), 0xC0007A0A); - } + } } #[cfg(any(target_os = "macos", @@ -132,5 +132,5 @@ mod bsd { #[test] fn test_op_read_write_64() { assert_eq!(iorw!(b'z', 10, (1 as u64) << 32), 0xC0007A0A); - } + } } |