Set O_* file status flags
#include <sys/dcmd_all.h> #define DCMD_ALL_SETFLAGS __DIOT(_DCMD_ALL, 2, int)
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device. |
dcmd | DCMD_ALL_SETFLAGS |
dev_data_ptr | A pointer to a int containing the flags you want to set. |
n_bytes | sizeof(int) |
dev_info_ptr | NULL |
This command sets O_* file status flags, described in <fcntl.h>. You can't use this command to set the file access bits. Clients usually use the fcntl() cover function to generate this request:
fcntl(fd, F_SETFL, flags);
A bitwise OR of zero or more of the following status flags (identified by the QNX Neutrino O_SETFLAG mask):
For more information, see open() in the QNX Neutrino C Library Reference.
None.
The devctl() function can return the following, in addition to the error codes listed in its entry in the C Library Reference:
if (devctl(fd, DCMD_ALL_SETFLAGS, &flags, sizeof flags, NULL) != EOK) { /* Error */ }