AWS IoT FreeRTOS+POSIX
fcntl.h File Reference

File control options. More...

Go to the source code of this file.

Macros

File creation flags for use in the oflag value to open() and openat().
#define O_CLOEXEC   0x0001
 
#define O_CREAT   0x0002
 
#define O_DIRECTORY   0x0004
 
#define O_EXCL   0x0008
 
#define O_NOCTTY   0x0010
 
#define O_NOFOLLOW   0x0020
 
#define O_TRUNC   0x0040
 
#define O_TTY_INIT   0x0080
 
File status flags for open(), openat(), and fcntl().
#define O_APPEND   0x0100
 
#define O_DSYNC   0x0200
 
#define O_NONBLOCK   0x0400
 
#define O_RSYNC   0x0800
 
#define O_SYNC   0x0200
 
Mask for file access modes.
#define O_ACCMODE   0xF000
 
File access modes for open(), openat(), and fcntl().
#define O_EXEC   0x1000
 
#define O_RDONLY   0x2000
 
#define O_RDWR   0xA000
 
#define O_SEARCH   0x4000
 
#define O_WRONLY   0x8000
 

Detailed Description

Macro Definition Documentation

◆ O_CLOEXEC

#define O_CLOEXEC   0x0001

Close the file descriptor upon exec().

◆ O_CREAT

#define O_CREAT   0x0002

Create file if it does not exist.

◆ O_DIRECTORY

#define O_DIRECTORY   0x0004

Fail if file is a non-directory file.

◆ O_EXCL

#define O_EXCL   0x0008

Exclusive use flag.

◆ O_NOCTTY

#define O_NOCTTY   0x0010

Do not assign controlling terminal.

◆ O_NOFOLLOW

#define O_NOFOLLOW   0x0020

Do not follow symbolic links.

◆ O_TRUNC

#define O_TRUNC   0x0040

Truncate flag.

◆ O_TTY_INIT

#define O_TTY_INIT   0x0080

termios structure provides conforming behavior.

◆ O_APPEND

#define O_APPEND   0x0100

Set append mode.

◆ O_DSYNC

#define O_DSYNC   0x0200

Write according to synchronized I/O data integrity completion.

◆ O_NONBLOCK

#define O_NONBLOCK   0x0400

Non-blocking mode.

◆ O_RSYNC

#define O_RSYNC   0x0800

Synchronized read I/O operations.

◆ O_SYNC

#define O_SYNC   0x0200

Write according to synchronized I/O file integrity completion.

◆ O_EXEC

#define O_EXEC   0x1000

Open for execute only (non-directory files).

◆ O_RDONLY

#define O_RDONLY   0x2000

Open for reading only.

◆ O_RDWR

#define O_RDWR   0xA000

Open for reading and writing.

◆ O_SEARCH

#define O_SEARCH   0x4000

Open directory for search only.

◆ O_WRONLY

#define O_WRONLY   0x8000

Open for writing only.