diff options
author | Paul Osborne <osbpau@gmail.com> | 2015-05-09 01:57:16 -0500 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2015-05-12 22:25:22 -0700 |
commit | a43613ac779a27b7299ab4d0f081638fe9b82faf (patch) | |
tree | d71ff2b1f15761c1a7522107981e286dafabcc77 /.gitignore | |
parent | 1a2d6d51f4f585e975eb3fb420904427d1f706f4 (diff) | |
download | nix-a43613ac779a27b7299ab4d0f081638fe9b82faf.zip |
ioctl: implement generic support for the ioctl syscall and supporting functions
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
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions