diff options
author | Bryant Mairs <bryantmairs@google.com> | 2018-01-28 19:03:14 -0800 |
---|---|---|
committer | Bryant Mairs <bryantmairs@google.com> | 2018-04-10 08:28:39 -0700 |
commit | 1a815f11473c1eb91a5613f8fe67d5e97975b3fc (patch) | |
tree | 28cd699f5d176443e35f91710e1068cc91dda9a9 /test/sys | |
parent | db7574f676c2c0f90a48dde0c34a73e9549d955f (diff) | |
download | nix-1a815f11473c1eb91a5613f8fe67d5e97975b3fc.zip |
Implement equivalent for _IOWINT for FreeBSD-like targets
ioctls on FreeBSD and DragonflyBSD have a separate request code generation
macro `_IOWINT` which is now exposed as `request_code_write_int`.
`ioctl_write_int` is also fixed on these platforms to use this new request
Diffstat (limited to 'test/sys')
-rw-r--r-- | test/sys/test_ioctl.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/sys/test_ioctl.rs b/test/sys/test_ioctl.rs index ec9d26a3..0a439b33 100644 --- a/test/sys/test_ioctl.rs +++ b/test/sys/test_ioctl.rs @@ -110,6 +110,13 @@ mod bsd { assert_eq!(request_code_none!(b'a', 255), 0x2000_61FF); } + #[cfg(any(target_os = "dragonfly", target_os = "freebsd"))] + #[test] + fn test_op_write_int() { + assert_eq!(request_code_write_int!(b'v', 4), 0x2004_7604); + assert_eq!(request_code_write_int!(b'p', 2), 0x2004_7002); + } + #[test] fn test_op_write() { assert_eq!(request_code_write!(b'z', 10, 1), 0x8001_7A0A); |