1*6f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 296433f6eSDavid Howells #ifndef _ALPHA_FCNTL_H 396433f6eSDavid Howells #define _ALPHA_FCNTL_H 496433f6eSDavid Howells 596433f6eSDavid Howells #define O_CREAT 01000 /* not fcntl */ 696433f6eSDavid Howells #define O_TRUNC 02000 /* not fcntl */ 796433f6eSDavid Howells #define O_EXCL 04000 /* not fcntl */ 896433f6eSDavid Howells #define O_NOCTTY 010000 /* not fcntl */ 996433f6eSDavid Howells 1096433f6eSDavid Howells #define O_NONBLOCK 00004 1196433f6eSDavid Howells #define O_APPEND 00010 1296433f6eSDavid Howells #define O_DSYNC 040000 /* used to be O_SYNC, see below */ 1396433f6eSDavid Howells #define O_DIRECTORY 0100000 /* must be a directory */ 1496433f6eSDavid Howells #define O_NOFOLLOW 0200000 /* don't follow links */ 1596433f6eSDavid Howells #define O_LARGEFILE 0400000 /* will be set by the kernel on every open */ 1696433f6eSDavid Howells #define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */ 1796433f6eSDavid Howells #define O_NOATIME 04000000 1896433f6eSDavid Howells #define O_CLOEXEC 010000000 /* set close_on_exec */ 1996433f6eSDavid Howells /* 2096433f6eSDavid Howells * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using 2196433f6eSDavid Howells * the O_SYNC flag. We continue to use the existing numerical value 2296433f6eSDavid Howells * for O_DSYNC semantics now, but using the correct symbolic name for it. 2396433f6eSDavid Howells * This new value is used to request true Posix O_SYNC semantics. It is 2496433f6eSDavid Howells * defined in this strange way to make sure applications compiled against 2596433f6eSDavid Howells * new headers get at least O_DSYNC semantics on older kernels. 2696433f6eSDavid Howells * 2796433f6eSDavid Howells * This has the nice side-effect that we can simply test for O_DSYNC 2896433f6eSDavid Howells * wherever we do not care if O_DSYNC or O_SYNC is used. 2996433f6eSDavid Howells * 3096433f6eSDavid Howells * Note: __O_SYNC must never be used directly. 3196433f6eSDavid Howells */ 3296433f6eSDavid Howells #define __O_SYNC 020000000 3396433f6eSDavid Howells #define O_SYNC (__O_SYNC|O_DSYNC) 3496433f6eSDavid Howells 3596433f6eSDavid Howells #define O_PATH 040000000 36bb458c64SAl Viro #define __O_TMPFILE 0100000000 3796433f6eSDavid Howells 3896433f6eSDavid Howells #define F_GETLK 7 3996433f6eSDavid Howells #define F_SETLK 8 4096433f6eSDavid Howells #define F_SETLKW 9 4196433f6eSDavid Howells 4296433f6eSDavid Howells #define F_SETOWN 5 /* for sockets. */ 4396433f6eSDavid Howells #define F_GETOWN 6 /* for sockets. */ 4496433f6eSDavid Howells #define F_SETSIG 10 /* for sockets. */ 4596433f6eSDavid Howells #define F_GETSIG 11 /* for sockets. */ 4696433f6eSDavid Howells 4796433f6eSDavid Howells /* for posix fcntl() and lockf() */ 4896433f6eSDavid Howells #define F_RDLCK 1 4996433f6eSDavid Howells #define F_WRLCK 2 5096433f6eSDavid Howells #define F_UNLCK 8 5196433f6eSDavid Howells 5296433f6eSDavid Howells /* for old implementation of bsd flock () */ 5396433f6eSDavid Howells #define F_EXLCK 16 /* or 3 */ 5496433f6eSDavid Howells #define F_SHLCK 32 /* or 4 */ 5596433f6eSDavid Howells 5696433f6eSDavid Howells #include <asm-generic/fcntl.h> 5796433f6eSDavid Howells 5896433f6eSDavid Howells #endif 59