Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the ioctl API and documentation #833

Merged
merged 3 commits into from
Apr 11, 2018

Commits on Apr 10, 2018

  1. Refactor the ioctl API and documentation

     * Split `ioctl!` into separate macros. This makes documentation easier to read.
     * For every `ioctl_*!` macro include a description of the macro arguments as, the
       function prototype for the generated wrapper function, and an example if we have one.
     * Expose `request_code_*!` in the documentation to make the `ioctl_*_bad` macros easier to use.
     * Reorganize the file hierarchy to be simpler
    Bryant Mairs committed Apr 10, 2018
    Configuration menu
    Copy the full SHA
    db7574f View commit details
    Browse the repository at this point in the history
  2. 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
    Bryant Mairs committed Apr 10, 2018
    Configuration menu
    Copy the full SHA
    1a815f1 View commit details
    Browse the repository at this point in the history
  3. Correct the third argument to ioctl on appropriate platforms.

    While usually `ioctl()` passes a pointer, the function call has been
    overloaded to allow integers to be passed. For some platforms this
    is an `int` and on others it's a `ulong`.
    
    Fixes nix-rust#824.
    Bryant Mairs committed Apr 10, 2018
    Configuration menu
    Copy the full SHA
    5dad660 View commit details
    Browse the repository at this point in the history