DCMD_ALL_GETFLAGS

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 Neutrino O_SETFLAG mask):

and the following file access modes:

For more information, see open() in the QNX Neutrino C Library Reference.

Example:

int flags;

if(devctl(fd, DCMD_ALL_GETFLAGS, &flags, sizeof flags, NULL) != EOK)
{
   /* Error */
}
return flags;

See also:

DCMD_ALL_SETFLAGS

devctl(), fcntl(), open() in the QNX Neutrino C Library Reference