summaryrefslogtreecommitdiff
path: root/src/sys/ioctl
AgeCommit message (Collapse)Author
2021-05-13Use https instead of httpRyan Zoeller
2021-03-21illumos and Solaris supportJason King
Co-authored-by: Dominik Hassler <hadfl@omnios.org> Co-authored-by: Joshua M. Clulow <josh@sysmgr.org>
2020-08-02`ioctl-number.rst` moved. Update the link.Solra Bizna
2020-05-31Convert the crate to edition 2018Alan Somers
2020-05-17Remove temporarily the failing tests for RedoxXavier L'Heureux
TODO: Fix them in Relibc
2020-03-08Fix a lint on Rust nightly 1.43.0Alan Somers
2020-02-02Merge #1176bors[bot]
1176: Add RISC-V support on GNU/Linux r=asomers a=msizanoen1 Co-authored-by: msizanoen1 <qtmlabs@protonmail.com>
2020-01-23ioctl: Fix broken link to the kernel documentationSimon Chopin
The file documenting ioctl number assignment in the Linux kernel has been converted to ReStructuredText (see https://lwn.net/Articles/705224/ for some background), the file extension has naturally changed.
2020-01-12Add RISC-V support on GNU/Linuxmsizanoen1
2019-05-24Allow import of Linux macros in Rust2018Bryant Mairs
Finish off the work started in 8c9ac5a70 allowing the use of macros without needing to import local inner macros.
2019-04-04export helper macros via `local_inner_macros`Andy Russell
This will allow users of the 2018 edition to import the macros without needing to also import their helpers.
2018-12-01Add ioctl definitions for sparc64-linuxBryant Mairs
2018-10-18Document ioctl_param_typeRukai
2018-04-10Correct the third argument to ioctl on appropriate platforms.Bryant Mairs
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 #824.
2018-04-10Implement equivalent for _IOWINT for FreeBSD-like targetsBryant Mairs
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
2018-04-10Refactor the ioctl API and documentationBryant Mairs
* 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
2017-12-20Use backticks around types/functions in docsBryant Mairs
2017-12-20Make numeric literals easier to readBryant Mairs
2017-12-04Stop reexporting `Errno` and its variantsJonas Schievink
cc #664 (unsure if this is everything needed)
2017-07-21Allow doc attributes in ioctl macroroblabla
2017-07-19Refactor ioctl! for buffersBryant Mairs
Instead of relying on the macro user to calculate the length in bytes do that within the macro itself
2017-07-19Add 'bad' prefixes for read, write_*, and readwrite ioctlsBryant Mairs
2017-07-19Split ioctl!(write ...) into write_ptr and write_intBryant Mairs
There two different write semantics used with ioctls: one involves passing a pointer the other involves passing an int. Previously the ioctl! macro did not distinguish between these cases and left it up to the user to set the proper datatype. This previous version was not type safe and prone to errors. The solution here is to split the "write" variant into a "write_ptr" and "write_int" variant that makes the semantics more explicit and improves type safety by specifying arguments better.
2017-07-19Unify argument names to generated ioctl functionsBryant Mairs
2017-07-19Remove unnecessary constantsBryant Mairs
2017-07-19Use the proper ioctl number type depending on targetBryant Mairs
This also means that we need to properly mask off bits to the valid range of ioctl numbers.
2017-07-19Remove ioc_* functionsBryant Mairs
These are low-level functions that shouldn't be exposed
2017-07-19Revise ioctl module documentationBryant Mairs
This refactors the examples to more directly address the exact use cases for the `ioctl!` macro that `nix` provides. Additionally other macros that should not be used by end users are no longer discussed.
2017-07-19Remove unnecessary path aliasingBryant Mairs
2017-07-19Hide internal macros/types within ioctlBryant Mairs
2017-07-19Add a "bad none" variant to the ioctl macroBryant Mairs
2017-07-19Re-add bad variant of ioctl!Bryant Mairs
2017-07-19Remove old workaroundBryant Mairs
2017-07-08Enable ioctl on mips64 and s390xBryant Mairs
2017-07-05We need to pass by value and not by pointer for writing ioctlsBastian Köcher
2017-06-19Support powerpc64Luca Barbato
The test_ioctl values are computed using ioctl-test.c
2017-04-21remove test warningsking6cong
2016-12-10Add ioctl support for BSDConrad Kramer
2016-12-10Change the readwrite buf ioctl call to use a *mut pointerConrad Kramer
2016-12-10Fix typo in documentationConrad Kramer
2016-01-28Errno::result()arcnmx
2015-11-20netbsd supportJeremy Fitzhardinge
2015-09-15ioctl: only run ioctl doctest under linuxPaul Osborne
2015-09-15ioctl: correct documentation and add example ioctl! codePaul Osborne
2015-09-15ioctl: make ioctl functions publicPaul Osborne
Consumers of the API may control visibility by means of a module. The following is a useful pattern that may be used by implementors (here for a couple of i2cdev ioctl definitions): mod ioctl { ioctl!(bad set_i2c_slave_address with super::I2C_SLAVE); ioctl!(bad i2c_smbus with super::I2C_SMBUS); } This resolves #184.
2015-09-15ioctl: clean up source file for ioctlsPaul Osborne
Readability was unecessarily impaired via a myriad of attributes to hide constants from the documentation. If these attributes are exposed publically, including them in the documentation makes sense.
2015-08-14ioctl: fix bugs with op generation for writesPaul Osborne
These had ior! rather than iow! previously. ior! is obviously not correct for write operations.
2015-08-14ioctl: do not make macro generated functions publicPaul Osborne
if code incorporating these macros wants to publicly export the functions they may do so by doing the following: pub ioctl!(...); Since the functions are unsafe, in many cases exposing the functions publicly will not be desirable.
2015-08-12ioctl: remove defunct readme for ioctl subsystemPaul Osborne
2015-08-12ioctl: return result type rather than raw integerPaul Osborne
This change also adds macro usages in the tests. Nothing is asserted but the use of the macros provides a basic compile-time check that is otherwise missing. Signed-off-by: Paul Osborne <osbpau@gmail.com>