6 ioctl-gen

Documentation

Making those magic ioctl numbers is really annoying without macros, so here are some macros. And if you were wondering, yes, they work in constants.

Example

```rs

[macro_use]

extern crate ioctlify;

// Taken from const VIDIOCRESERVED: u32 = io!(b'V', 1); const VIDIOCSTREAMON: u32 = iow!(b'V', 18, 4); const VIDIOCLOGSTATUS: u32 = io!(b'V', 70);

asserteq!(ioctype!(VIDIOCRESERVED), b'V' as u32); asserteq!(VIDIOCSTREAMON, 1074026002); asserteq!(iocnr!(VIDIOCLOG_STATUS), 70); ```

Installation

In Cargo.toml:

toml [dependencies] ioctl-gen = "0.1.0"

License

The MIT license.