summaryrefslogtreecommitdiff
path: root/src/sys/ioctl.rs
AgeCommit message (Collapse)Author
2015-08-12Update some stuff for upstream bitflags changesCorey Richardson
2015-05-29Basic OpenBSD support.Laurence Tratt
Some of the tests are currently unrunnable, but the basic library is at least buildable.
2015-05-28Remove std::os::unix::io::RawFd re-exportCarl Lerche
2015-05-13docs: fix module documentation for ioctlPaul Osborne
Two problems were fixed: 1. All of the comments for the module were prefixed with `///!` instead of just `//!` 2. There was no newline before lists which is required in markdown, so they were not rendering correctly.
2015-05-12ioctl: modify type signatures to match common ioctl usage and libc implsPaul Osborne
The ioctl interface expected by most external parties is that of an unsigned long (c_ulong). The libc crate expects as an int. This change exposes c_ulong (via ioctl_op_t) to external users and casts to c_int before calling the libc function. The only documentation in SUSv3 for ioctl has to do with stream devices. The support documented there is not widely supported (it is not supported by the Linux kernel)[1]. [1] The Linux Programming Interface, Page 86.
2015-05-12ioctl: implement generic support for the ioctl syscall and supporting functionsPaul Osborne
This commit provides a new implementation for ioctl that is much more generic, allowing for clients to use send any manner of ioctl requests at special files. The implementation provides two main features that help to raise the level of abstraction over that provided by libc. 1. The module now provides functions that provide the same functionality as the linux kernel _IO* macros. These are used frequently in the linux kernel for building ops for ioctls. The use of these helper functions are not required. 2. Functions are provided for the 3 main types of ioctl usage patterns (read, write, and execute). For many subystems, the read() call which returns a Result<T> and the write calls taking a &T provide a nice interface. All of the methods wrapping ioctl are unsafe and will probably need to remain that way unless knowledge of the semantics of every possible ioctl call are added to the nix library. The best that exists for ioctls are some conventions around the op, but even these conventions are really only used for newer devices added to the kernel. This change resolves #108
2015-04-03'derive(Copy)' needs Clone nowFlorian Hartwig
2015-03-24NixResult -> nix::Result; NixError -> nix::ErrorCarl Lerche
2015-03-13Amend some files to make it compile on arm-linux-androideabi.kennytm
2015-02-10Add `NixPath`, `NixError`, and `NixResult`.Utkarsh Kukreti
2015-01-27Fix warnings for `rustc 1.0.0-dev (e365e4c05 2015-01-27 08:40:39)`.Utkarsh Kukreti
2015-01-21Add `ioctl`. Only supports the `TIOCGWINSZ` request right now.Utkarsh Kukreti