1 .\" Copyright (c) 1980 Regents of the University of California.
2 .\" All rights reserved. The Berkeley software License Agreement
3 .\" specifies the terms and conditions for redistribution.
5 .\" @(#)ioctl.2 6.3 (Berkeley) 3/4/86
7 .TH IOCTL 2 "March 4, 1986"
10 ioctl \- control device
14 #include <sys/types.h>
15 #include <sys/ioctl.h>
18 int ioctl(int \fId\fP, int \fIrequest\fP, void *\fIargp\fP) (Minix)
19 int ioctl(int \fId\fP, ioreq_t \fIrequest\fP, void *\fIargp\fP) (Minix-vmd)
25 performs a variety of functions
26 on open descriptors. In particular, many operating
27 characteristics of character special files (e.g. terminals)
28 may be controlled with
31 The writeups of various devices in section 4 discuss how
37 has encoded in it whether the argument is an \*(lqin\*(rq parameter
38 or \*(lqout\*(rq parameter, and the size of the argument \fIargp\fP in bytes.
39 Macros and defines used in specifying an ioctl
41 are located in the file
44 If an error has occurred, a value of \-1 is returned and
46 is set to indicate the error.
49 will fail if one or more of the following are true:
52 \fID\fP is not a valid descriptor.
55 \fID\fP is not associated with a character
59 The specified request does not apply to the kind
60 of object that the descriptor \fId\fP references.
63 \fIRequest\fP or \fIargp\fP is not valid.