DCMD_ALL_SETFLAGS
QNX SDP8.0Devctl and Ioctl CommandsDeveloper
Set O_* file status flags
Synopsis:
#include <sys/dcmd_all.h>
#define DCMD_ALL_SETFLAGS   __DIOT(_DCMD_ALL, 2, int)
Arguments to devctl():
| 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 | 
Description:
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);
Input:
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
 
For more information, see open() in the QNX OS C Library Reference.
Output:
None.
Errors:
The devctl() function can return the following, in addition to the error codes listed in its entry in the C Library Reference:
- EINVAL
 - You specified one of the *SYNC flags, but IOFUNC_PC_SYNC_IO isn't set in the device's mount configuration.
 
Example:
if (devctl(fd, DCMD_ALL_SETFLAGS, &flags, sizeof flags, NULL) != EOK)
{
   /* Error */
}
See also:
Page updated: 
