1 /* SPDX-License-Identifier: BSD-3-Clause */ 2 /* 3 * Copyright (c) 1994-2009 Red Hat, Inc. All rights reserved. 4 */ 5 6 #ifndef _SYS_FCNTL_H_ 7 #define _SYS_FCNTL_H_ 8 9 #define _FAPPEND 0x0008 /* append (writes guaranteed at the end) */ 10 #define _FCREAT 0x0200 /* open with file create */ 11 #define _FTRUNC 0x0400 /* open with truncation */ 12 13 /* 14 * Flag values for open(2) and fcntl(2) 15 */ 16 #define O_RDONLY 0 /* +1 == FREAD */ 17 #define O_WRONLY 1 /* +1 == FWRITE */ 18 #define O_RDWR 2 /* +1 == FREAD|FWRITE */ 19 #define O_APPEND _FAPPEND 20 #define O_CREAT _FCREAT 21 #define O_TRUNC _FTRUNC 22 23 #endif /* _SYS_FCNTL_H_ */ 24