NAME
ioctl - control device
SYNOPSIS
#include <stdio_p.h>
#include <ioctl_p.h>
ioctl(fildes, request, arg)
FD fildes;
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]
-
request
or
arg
is not valid. See
tty(4).
[EINVAL]
RETURN VALUE
If an error has occurred,
errno
is set to indicate the error.
SEE ALSO
tty(4)