Macro nix::sys::ioctl::request_code_none
source · macro_rules! request_code_none {
($ty:expr, $nr:expr) => { ... };
}
Expand description
Generate an ioctl request code for a command that passes no data.
This is equivalent to the _IO()
macro exposed by the C ioctl API.
You should only use this macro directly if the ioctl
you’re working
with is “bad” and you cannot use ioctl_none!()
directly.
Example
const KVMIO: u8 = 0xAE;
ioctl_write_int_bad!(kvm_create_vm, request_code_none!(KVMIO, 0x03));