Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ioctl(2) — UTek W2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

execve(2)

fcntl(2)

tty(4)

intro(4n)



IOCTL(2)                COMMAND REFERENCE                IOCTL(2)



NAME
     ioctl - control device

SYNOPSIS
     #include <sys/ioctl.h>

     ioctl(fd, request, argp)
     int fd;
     long request;
     char *argp;

DESCRIPTION
     Ioctl performs a variety of functions, specified by request,
     on the open descriptor fd. In particular, many operating
     characteristics of character special files (e.g. terminals)
     may be controlled with ioctl requests.

     An ioctl request has encoded in it whether the argument argp
     is an "in" parameter or "out" parameter, and the size of
     argp in bytes.  Macros and defines used in specifying an
     ioctl request are located in the file <sys/ioctl.h>.

     The writeups of various devices in section 4 discuss how
     ioctl applies to them.  See that section for details.

DIAGNOSTICS
     Ioctl will fail if one or more of the following are true:

     [EBADF]
         Fd is not a valid open descriptor, or the object it
         references is not readable or writable.

     [ENOTTY]
         Fd is not associated with a character special device.

     [ENOTTY]
         The specified request does not apply to the kind of
         object which the descriptor fd references.

     [EINVAL]
         Request or argp is not valid.

     [EFAULT]
         Argp references an invalid address.

     [EFAULT]
         The size encoded in request is invalid.

RETURN VALUE
     If an error has occurred, a value of -1 is returned and
     errno is set to indicate the error.




Printed 10/17/86                                                1





IOCTL(2)                COMMAND REFERENCE                IOCTL(2)



SEE ALSO
     execve(2), fcntl(2), tty(4), intro(4n).





















































Printed 10/17/86                                                2





































































%%index%%
na:72,58;
sy:130,592;
de:722,917;
di:1639,736;
rv:2375,192;
se:2711,194;
%%index%%000000000106

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026