summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/ioctl.223
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/libc/sys/ioctl.2 b/lib/libc/sys/ioctl.2
index 400fb9f236a..32ef467d437 100644
--- a/lib/libc/sys/ioctl.2
+++ b/lib/libc/sys/ioctl.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ioctl.2,v 1.6 1999/05/23 14:10:54 aaron Exp $
+.\" $OpenBSD: ioctl.2,v 1.7 1999/05/28 01:51:48 aaron Exp $
.\" $NetBSD: ioctl.2,v 1.5 1995/02/27 12:33:47 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -43,7 +43,7 @@
.Sh SYNOPSIS
.Fd #include <sys/ioctl.h>
.Ft int
-.Fn ioctl "int d" "unsigned long request" "char *argp"
+.Fn ioctl "int d" "unsigned long request" "..."
.Sh DESCRIPTION
The
.Fn ioctl
@@ -53,19 +53,30 @@ characteristics of character special files (e.g. terminals)
may be controlled with
.Fn ioctl
requests.
+.Pp
The argument
.Fa d
-must be an open file descriptor.
+must be an open file descriptor. The third argument is called
+.Fa arg
+and contains additional information needed by this device
+to perform the requested function.
+.Fa arg
+is either an
+.Fa int
+or a pointer to a device-specific data structure, depending upon
+the given
+.Fa request .
.Pp
-An ioctl
+An
+.Nm
.Fa request
has encoded in it whether the argument is an
.Dq in
parameter
or
.Dq out
-parameter, and the size of the argument
-.Fa argp
+parameter, and the size of the third argument
+.Pq Fa arg
in bytes.
Macros and defines used in specifying an ioctl
.Fa request