Unix and Linux Discussions Tagged with inappropriate ioctl for device |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
8 |
19,698 |
Shell Programming and Scripting |
|
|
|
35 |
28,648 |
Shell Programming and Scripting |
|
|
|
18 |
14,258 |
Linux |
|
|
|
2 |
5,737 |
Cybersecurity |
|
|
|
1 |
4,032 |
AIX |
|
|
|
8 |
6,007 |
Shell Programming and Scripting |
|
|
|
8 |
28,801 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,670 |
UNIX for Dummies Questions & Answers |
|
|
|
11 |
403,449 |
Shell Programming and Scripting |
|
|
|
7 |
14,003 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
40,068 |
Solaris |
|
|
|
3 |
6,209 |
Shell Programming and Scripting |
|
|
|
2 |
17,594 |
Solaris |
|
|
|
2 |
19,531 |
Solaris |
|
|
|
4 |
41,717 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
8,631 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
20,005 |
Shell Programming and Scripting |
|
|
|
1 |
2,674 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
15,703 |
Linux |
|
|
|
2 |
4,106 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
2,017 |
Shell Programming and Scripting |
|
|
|
4 |
29,280 |
Filesystems, Disks and Memory |
|
|
|
1 |
3,169 |
Shell Programming and Scripting |
|
|
|
10 |
6,075 |
UNIX for Dummies Questions & Answers |
IOCTL(2) BSD System Calls Manual IOCTL(2)
NAME
ioctl -- control device
SYNOPSIS
#include <sys/ioctl.h>
int
ioctl(int fildes, unsigned long request, ...);
DESCRIPTION
The ioctl() function manipulates the underlying device parameters of special files. In particular, many operating characteristics of charac-
ter special files (e.g. terminals) may be controlled with ioctl() requests. The argument fildes must be an open file descriptor.
An ioctl request has encoded in it whether the argument is an ``in'' parameter or ``out'' parameter, and the size of the argument argp in
bytes. Macros and defines used in specifying an ioctl request are located in the file <sys/ioctl.h>.
RETURN VALUES
If an error has occurred, a value of -1 is returned and errno is set to indicate the error.
ERRORS
ioctl() will fail if:
[EBADF] fildes is not a valid descriptor.
[EINVAL] Request or argp is not valid.
[ENOTTY] fildes is not associated with a character special device.
[ENOTTY] The specified request does not apply to the kind of object that the descriptor fildes references.
SEE ALSO
cdio(1), chio(1), mt(1), execve(2), fcntl(2), intro(4), tty(4)
HISTORY
An ioctl() function call appeared in Version 7 AT&T UNIX.
4th Berkeley Distribution December 11, 1993 4th Berkeley Distribution