IOCTL(2) — UNIX 3.0
NAME
ioctl − control device
SYNOPSIS
#include <sys/ioctl.h>
ioctl(fildes, request, arg)
DESCRIPTION
Ioctl performs a variety of functions on character special files (devices). The writeups of various devices in Section 4 discuss how ioctl applies to them.
Ioctl will fail if one or more of the following are true:
Fildes is not a valid open file descriptor. [EBADF]
Fildes is not associated with a character special device. [ENOTTY]
Request or arg is not valid. See tty(4). [EINVAL]
RETURN VALUE
If an error has occurred, a value of −1 is returned and errno is set to indicate the error.
SEE ALSO
May 16, 1980