Get O_* file status flags
#include <sys/dcmd_all.h> #define DCMD_ALL_GETFLAGS __DIOF(_DCMD_ALL, 1, int)
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 |
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);
None.
A bitwise OR of zero or more of the following status flags (identified by the QNX Neutrino O_SETFLAG mask):
and the following file access modes:
For more information, see open() in the QNX Neutrino C Library Reference.
int flags; if(devctl(fd, DCMD_ALL_GETFLAGS, &flags, sizeof flags, NULL) != EOK) { /* Error */ } return flags;