Skip to content

Commit

Permalink
Fix rendering and wrap to 100 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
Susurrus committed Jul 14, 2017
1 parent 35c2272 commit 8b897fc
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/sys/ioctl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@
//! What is an `ioctl`?
//! ===================
//!
//! The `ioctl` syscall is the grab-bag syscall on POSIX systems. Don't want
//! to add a new syscall? Make it an `ioctl`! `ioctl` refers to both the syscall,
//! and the commands that can be send with it. `ioctl` stands for "IO control",
//! and the commands are always sent to a file descriptor.
//! The `ioctl` syscall is the grab-bag syscall on POSIX systems. Don't want to add a new
//! syscall? Make it an `ioctl`! `ioctl` refers to both the syscall, and the commands that can be
//! sent with it. `ioctl` stands for "IO control", and the commands are always sent to a file
//! descriptor.
//!
//! It is common to see `ioctl`s used for the following purposes:
//!
//! * Provide read/write access to out-of-band data related
//! to a device such as configuration (for instance, setting
//! serial port options)
//! * Provide a mechanism for performing full-duplex data
//! transfers (for instance, xfer on SPI devices).
//! * Provide access to control functions on a device (for example,
//! on Linux you can send commands like pause, resume, and eject
//! to the CDROM device.
//! * Do whatever else the device driver creator thought made most sense.
//! * Provide read/write access to out-of-band data related to a device such as configuration
//! (for instance, setting serial port options)
//! * Provide a mechanism for performing full-duplex data transfers (for instance, xfer on SPI
//! devices).
//! * Provide access to control functions on a device (for example, on Linux you can send
//! commands like pause, resume, and eject to the CDROM device.
//! * Do whatever else the device driver creator thought made most sense.
//!
//! `ioctl`s are synchronous system calls and are similar to read and write calls in that regard.
//! They operate on file descriptors and have an identifier that specifies what the ioctl is.
Expand All @@ -30,6 +28,7 @@
//!
//! Historically `ioctl` numbers were arbitrary hard-coded values. This changed to a more-ordered
//! system where the ioctl numbers had various subcomponents:
//!
//! * Number: The actual ioctl ID
//! * Type: A grouping of ioctls for a common purpose or driver
//! * Size: The size in bytes of the data that will be transferred
Expand Down

0 comments on commit 8b897fc

Please sign in to comment.