DCMD_ALL_GETFLAGS
QNX SDP8.0Devctl and Ioctl CommandsDeveloper
Get O_* file status flags
Synopsis:
#include <sys/dcmd_all.h>
#define DCMD_ALL_GETFLAGS __DIOF(_DCMD_ALL, 1, int)
Arguments to devctl():
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device. |
dcmd | DCMD_ALL_GETFLAGS |
dev_data_ptr | A pointer to an int where the device can store the flags. |
n_bytes | sizeof(int) |
dev_info_ptr | NULL |
Description:
This command gets O_* file status flags and file access modes, described in <fcntl.h>. Clients usually use the fcntl() cover function to generate this request:
fcntl(fd, F_GETFL);
Input:
None.
Output:
A bitwise OR of zero or more of the following status flags (identified by the QNX OS O_SETFLAG mask):
- O_APPEND
- O_DSYNC
- O_LARGEFILE
- O_NONBLOCK
- O_RSYNC
- O_SYNC
and the following file access modes:
- O_RDONLY
- O_RDWR
- O_WRONLY
For more information, see open() in the QNX OS C Library Reference.
Example:
int flags;
if(devctl(fd, DCMD_ALL_GETFLAGS, &flags, sizeof flags, NULL) != EOK)
{
/* Error */
}
return flags;
See also:
Page updated: