ioctl Implementation
More...
Go to the source code of this file.
|
#define | _IO(type, nr) ((((type) & 0xFFFF) << 16)|((nr) & 0xFFFF)) |
| Generate an ioctl Command Code.
|
|
|
int | ioctl (int fd, unsigned long cmd, void *argp) |
| Perform IO Control Request.
|
|
◆ _IO
#define _IO |
( |
|
type, |
|
|
|
nr |
|
) |
| ((((type) & 0xFFFF) << 16)|((nr) & 0xFFFF)) |
Generate an ioctl Command Code.
- Parameters
-
[in] | type | A 16-bit number, often a character literal, specific to a subsystem or driver |
[in] | nr | A 16-bit number identifying the specific command, unique for a given value of 'type' |
- Returns
- An ioctl Command Code
◆ ioctl()
int ioctl |
( |
int |
fd, |
|
|
unsigned long |
cmd, |
|
|
void * |
argp |
|
) |
| |
Perform IO Control Request.
- Parameters
-
[in] | fd | File handle |
[in] | cmd | Request ioctl command code |
[in] | argp | Pointer to a request-specific data structure |
- Returns
- Zero on success, or a negative value on error.