9.19 ioctl

int ioctl(int fd, unsigned long request, void *argument);

This syscall manipulates the underlying device parameters of special files. It allows a device-dependent API for fetching and setting several modes.

Despite not all ioctl calls needing a specific value for their arguments, due to current limitations, all arguments must point to valid memory, regardless of whether it ends up used or not.

ioctl returns 0 on success and -1 on failure, and sets the following errno: