1e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 261730c53SDavid Howells /* 361730c53SDavid Howells * This file is subject to the terms and conditions of the GNU General Public 461730c53SDavid Howells * License. See the file "COPYING" in the main directory of this archive 561730c53SDavid Howells * for more details. 661730c53SDavid Howells * 761730c53SDavid Howells * Copyright (C) 1995, 96, 97, 98, 99, 2003, 05 Ralf Baechle 861730c53SDavid Howells */ 9a932fec8SRalf Baechle #ifndef _UAPI_ASM_FCNTL_H 10a932fec8SRalf Baechle #define _UAPI_ASM_FCNTL_H 1161730c53SDavid Howells 12b8121f0fSRalf Baechle #include <asm/sgidefs.h> 1361730c53SDavid Howells 1461730c53SDavid Howells #define O_APPEND 0x0008 1561730c53SDavid Howells #define O_DSYNC 0x0010 /* used to be O_SYNC, see below */ 1661730c53SDavid Howells #define O_NONBLOCK 0x0080 1761730c53SDavid Howells #define O_CREAT 0x0100 /* not fcntl */ 1861730c53SDavid Howells #define O_TRUNC 0x0200 /* not fcntl */ 1961730c53SDavid Howells #define O_EXCL 0x0400 /* not fcntl */ 2061730c53SDavid Howells #define O_NOCTTY 0x0800 /* not fcntl */ 2161730c53SDavid Howells #define FASYNC 0x1000 /* fcntl, for BSD compatibility */ 2261730c53SDavid Howells #define O_LARGEFILE 0x2000 /* allow large file opens */ 2361730c53SDavid Howells /* 2461730c53SDavid Howells * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using 2561730c53SDavid Howells * the O_SYNC flag. We continue to use the existing numerical value 2661730c53SDavid Howells * for O_DSYNC semantics now, but using the correct symbolic name for it. 2761730c53SDavid Howells * This new value is used to request true Posix O_SYNC semantics. It is 2861730c53SDavid Howells * defined in this strange way to make sure applications compiled against 2961730c53SDavid Howells * new headers get at least O_DSYNC semantics on older kernels. 3061730c53SDavid Howells * 3161730c53SDavid Howells * This has the nice side-effect that we can simply test for O_DSYNC 3261730c53SDavid Howells * wherever we do not care if O_DSYNC or O_SYNC is used. 3361730c53SDavid Howells * 3461730c53SDavid Howells * Note: __O_SYNC must never be used directly. 3561730c53SDavid Howells */ 3661730c53SDavid Howells #define __O_SYNC 0x4000 3761730c53SDavid Howells #define O_SYNC (__O_SYNC|O_DSYNC) 3861730c53SDavid Howells #define O_DIRECT 0x8000 /* direct disk access hint */ 3961730c53SDavid Howells 4061730c53SDavid Howells #define F_GETLK 14 4161730c53SDavid Howells #define F_SETLK 6 4261730c53SDavid Howells #define F_SETLKW 7 4361730c53SDavid Howells 4461730c53SDavid Howells #define F_SETOWN 24 /* for sockets. */ 4561730c53SDavid Howells #define F_GETOWN 23 /* for sockets. */ 4661730c53SDavid Howells 47*306f7cc1SChristoph Hellwig #if __BITS_PER_LONG == 32 || defined(__KERNEL__) 4861730c53SDavid Howells #define F_GETLK64 33 /* using 'struct flock64' */ 4961730c53SDavid Howells #define F_SETLK64 34 5061730c53SDavid Howells #define F_SETLKW64 35 51*306f7cc1SChristoph Hellwig #endif /* __BITS_PER_LONG == 32 || defined(__KERNEL__) */ 5261730c53SDavid Howells 53b8121f0fSRalf Baechle #if _MIPS_SIM != _MIPS_SIM_ABI64 549f79b8b7SChristoph Hellwig #define __ARCH_FLOCK_EXTRA_SYSID long l_sysid; 559f79b8b7SChristoph Hellwig #define __ARCH_FLOCK_PAD long pad[4]; 569f79b8b7SChristoph Hellwig #endif 5761730c53SDavid Howells 5861730c53SDavid Howells #include <asm-generic/fcntl.h> 5961730c53SDavid Howells 60a932fec8SRalf Baechle #endif /* _UAPI_ASM_FCNTL_H */ 61