Unix and Linux Discussions Tagged with inappropriate ioctl for device |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
8 |
20,176 |
Shell Programming and Scripting |
|
|
|
35 |
30,655 |
Shell Programming and Scripting |
|
|
|
18 |
16,370 |
Linux |
|
|
|
2 |
5,999 |
Cybersecurity |
|
|
|
1 |
4,391 |
AIX |
|
|
|
8 |
6,344 |
Shell Programming and Scripting |
|
|
|
8 |
29,891 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
5,104 |
UNIX for Dummies Questions & Answers |
|
|
|
11 |
409,684 |
Shell Programming and Scripting |
|
|
|
7 |
14,483 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
40,431 |
Solaris |
|
|
|
3 |
6,385 |
Shell Programming and Scripting |
|
|
|
2 |
17,923 |
Solaris |
|
|
|
2 |
20,357 |
Solaris |
|
|
|
4 |
42,541 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
9,339 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
20,398 |
Shell Programming and Scripting |
|
|
|
1 |
2,830 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
15,979 |
Linux |
|
|
|
2 |
4,411 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
2,156 |
Shell Programming and Scripting |
|
|
|
4 |
30,002 |
Filesystems, Disks and Memory |
|
|
|
1 |
3,288 |
Shell Programming and Scripting |
|
|
|
10 |
6,467 |
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 d, unsigned long request, char *argp);
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 d 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] d is not a valid descriptor.
[ENOTTY] d is not associated with a character special device.
[ENOTTY] The specified request does not apply to the kind of object that the descriptor d references.
[EINVAL] Request or argp is not valid.
SEE ALSO
mt(1), cdio(1), chio(1), execve(2), fcntl(2), tty(4), intro(4)
HISTORY
An ioctl() function call appeared in Version 7 AT&T UNIX.
4th Berkeley Distribution December 11, 1993 4th Berkeley Distribution