[][src]Macro nix::ioctl_write_int

macro_rules! ioctl_write_int {
    ($(#[$attr:meta])* $name:ident, $ioty:expr, $nr:expr) => { ... };
}

Generates a wrapper function for a ioctl that writes an integer to the kernel.

The arguments to this macro are:

The generated function has the following signature:

This example is not tested
pub unsafe fn FUNCTION_NAME(fd: libc::c_int, data: nix::sys::ioctl::ioctl_param_type) -> Result<libc::c_int>

nix::sys::ioctl::ioctl_param_type depends on the OS:

For a more in-depth explanation of ioctls, see ::sys::ioctl.

Example

ioctl_write_int!(vt_activate, b'v', 4);