summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/man/man2/ioctl.224
1 files changed, 9 insertions, 15 deletions
diff --git a/usr/src/man/man2/ioctl.2 b/usr/src/man/man2/ioctl.2
index 73e5084d27..59271fdcce 100644
--- a/usr/src/man/man2/ioctl.2
+++ b/usr/src/man/man2/ioctl.2
@@ -44,11 +44,10 @@
.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
.\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
.\"
-.TH IOCTL 2 "Feb 15, 1996"
+.TH IOCTL 2 "June 18, 2020"
.SH NAME
ioctl \- control device
.SH SYNOPSIS
-.LP
.nf
#include <unistd.h>
#include <stropts.h>
@@ -57,12 +56,10 @@ ioctl \- control device
.fi
.SH DESCRIPTION
-.sp
-.LP
The \fBioctl()\fR function performs a variety of control functions on devices
and streams. For non-streams files, the functions performed by this call are
device-specific control functions. The \fIrequest\fR argument and an optional
-third argument with varying type are passed to the file designated by
+third argument with varying type are passed to the device file designated by
\fIfildes\fR and are interpreted by the device driver.
.sp
.LP
@@ -81,16 +78,12 @@ to a device-specific data structure.
.LP
In addition to device-specific and streams functions, generic functions are
provided by more than one device driver (for example, the general terminal
-interface.) See \fBtermio\fR(7I)).
+interface or disk interfaces.) See \fBtermio\fR(7I)), \fBdkio\fR(7I), etc..
.SH RETURN VALUES
-.sp
-.LP
Upon successful completion, the value returned depends upon the device control
function, but must be a non-negative integer. Otherwise, \fB\(mi1\fR is
returned and \fBerrno\fR is set to indicate the error.
.SH ERRORS
-.sp
-.LP
The \fBioctl()\fR function will fail for any type of file if:
.sp
.ne 2
@@ -144,6 +137,7 @@ to by \fIarg\fR, but \fIarg\fR points to an illegal address.
.ad
.RS 11n
The \fIrequest\fR or \fIarg\fR argument is not valid for this device.
+Many devices return \fBENOTTY\fR for an unknown \fIrequest\fR.
.RE
.sp
@@ -171,8 +165,10 @@ is no longer active.
\fB\fBENOTTY\fR\fR
.ad
.RS 11n
-The \fIfildes\fR argument is not associated with a streams device that accepts
+The \fIfildes\fR argument is not associated with a device that accepts
control functions.
+.sp
+The device driver does not know the \fIrequest\fR command.
.RE
.sp
@@ -183,6 +179,8 @@ control functions.
.RS 11n
The \fIrequest\fR and \fIarg\fR arguments are valid for this device driver, but
the service requested can not be performed on this particular subdevice.
+.sp
+The device driver does not support the \fBioctl()\fR function.
.RE
.sp
@@ -199,8 +197,6 @@ corresponding device driver does not support the \fBioctl()\fR function.
.LP
Streams errors are described in \fBstreamio\fR(7I).
.SH ATTRIBUTES
-.sp
-.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -215,6 +211,4 @@ Interface Stability Standard
.TE
.SH SEE ALSO
-.sp
-.LP
\fBattributes\fR(5), \fBstandards\fR(5), \fBstreamio\fR(7I), \fBtermio\fR(7I)