What are the core values ​​of IOCL

Provided by: manpages-de-dev_2.5-1_all


ioctl - control device


#include<sys/ioctl.h>intioctl (intfd,unsignedlongrequest,…);


The system call ioctl() manipulates the underlying device parameters of special files. In particular, many operating characteristics of character-oriented special files (e.g. terminals) can be carried out ioctl-Calls are controlled. The argument fd must be an open file descriptor. The second argument is a device-dependent call code. The third argument is a typeless pointer to memory. It's traditional char*argp (from a time before void* was valid C) and is so called for this discussion. In one ioctl()-call is coded whether the argument is a in- or outParameter is as well as the size of the argument argp in bytes. Macros and definitions used in the specification of a ioctl()-Call are in the file <sys/ioctl.h>.


Usually zero is returned in case of success. A couple ioctl() Calls use the return value as an output parameter and return a non-negative value if successful. If there is an error, -1 is returned and errno set accordingly.


EBADFfd is not a valid file descriptor. EFAULTargp references a memory area that cannot be accessed. EINVALcall or argp is not valid. ENOTTYfd is not associated with a special character-oriented device. ENOTTY The specified call does not match the type of object on which the file descriptor fd relates.


No single standard. Arguments, return values, and semantics of ioctl(2) Vary depending on the device driver requested (the call is used as a panacea for any operation that does not properly fit the UNIX stream I / O model). Read ioctl_list(2) to get a list of many of the well known ioctlCalls to receive. The system call ioctl appeared in version 7 of AT&T UNIX.


An open file descriptor is required to use this call. The call of open(2) often has undesirable side effects that are caused by specifying the switch under Linux O_NONBLOCK can be avoided.


execve(2), fcntl(2), ioctl_console(2), ioctl_fat(2), ioctl_ficlonerange(2), ioctl_fideduperange(2), ioctl_getfsmap(2), ioctl_iflags(2), ioctl_list(2), ioctl_ns(2), ioctl_tty(2), ioctl_userfaultfd(2), open(2), sd(4), tty(4)


This page is part of the release 4.15 of the Linux projectman-pages. A description of the project, information on how errors can be reported and the current version of this page can be found at https://www.kernel.org/doc/man-pages/.


The German translation of this manual page was done by Patrick Rother , Martin Schulze , Michael Piefel , Chris Leick , Mario Blättermann and Dr. Tobias Quathamer created. This translation is Free Documentation; see the GNU General Public License version 3 or later for copyright terms. We assume NO LIABILITY. If you find errors in the translation of this manual page, please send an email to .