IOCTL(2) — Silicon Graphics
NAME
ioctl − control device
SYNOPSIS
ioctl (fildes, request, arg)
DESCRIPTION
Ioctl performs a variety of functions on character special files (devices). The writeups of various devices in Section 7 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 Section 7. [EINVAL]
RETURN VALUE
If an error has occurred, a value of −1 is returned and errno is set to indicate the error.
SEE ALSO
termio(7) in the UNIX Programmer’s Manual.
ASSEMBLER
moveq#54,D0| sys ioctl
movlfildes,A0
movlrequest,D1
movl#argp,A1
trap#0
Version 3.6 — December 20, 1987