11da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifndef _ALPHA_FCNTL_H 21da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define _ALPHA_FCNTL_H 31da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 41da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define O_CREAT 01000 /* not fcntl */ 51da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define O_TRUNC 02000 /* not fcntl */ 61da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define O_EXCL 04000 /* not fcntl */ 71da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define O_NOCTTY 010000 /* not fcntl */ 81da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 91da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define O_NONBLOCK 00004 101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define O_APPEND 00010 116b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig#define O_DSYNC 040000 /* used to be O_SYNC, see below */ 121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define O_DIRECTORY 0100000 /* must be a directory */ 131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define O_NOFOLLOW 0200000 /* don't follow links */ 141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define O_LARGEFILE 0400000 /* will be set by the kernel on every open */ 151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */ 161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define O_NOATIME 04000000 17620b5e68ee89ba1d3f017056857459dc21be8c7bRichard Henderson#define O_CLOEXEC 010000000 /* set close_on_exec */ 186b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig/* 1976b7e0058d09f8104387980a690001681c04cc0aChristoph Hellwig * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using 206b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig * the O_SYNC flag. We continue to use the existing numerical value 216b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig * for O_DSYNC semantics now, but using the correct symbolic name for it. 226b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig * This new value is used to request true Posix O_SYNC semantics. It is 236b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig * defined in this strange way to make sure applications compiled against 246b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig * new headers get at least O_DSYNC semantics on older kernels. 256b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig * 266b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig * This has the nice side-effect that we can simply test for O_DSYNC 276b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig * wherever we do not care if O_DSYNC or O_SYNC is used. 286b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig * 296b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig * Note: __O_SYNC must never be used directly. 306b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig */ 316b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig#define __O_SYNC 020000000 326b2f3d1f769be5779b479c37800229d9a4809fc3Christoph Hellwig#define O_SYNC (__O_SYNC|O_DSYNC) 331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 345229645bdc35f1cc43eb8b25b6993c8fa58b4b43Stephen Rothwell#define O_PATH 040000000 35bb458c644a59dbba3a1fe59b27106c5e68e1c4bdAl Viro#define __O_TMPFILE 0100000000 365229645bdc35f1cc43eb8b25b6993c8fa58b4b43Stephen Rothwell 371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define F_GETLK 7 381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define F_SETLK 8 391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define F_SETLKW 9 401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define F_SETOWN 5 /* for sockets. */ 421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define F_GETOWN 6 /* for sockets. */ 431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define F_SETSIG 10 /* for sockets. */ 441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define F_GETSIG 11 /* for sockets. */ 451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* for posix fcntl() and lockf() */ 471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define F_RDLCK 1 481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define F_WRLCK 2 491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define F_UNLCK 8 501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* for old implementation of bsd flock () */ 521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define F_EXLCK 16 /* or 3 */ 531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define F_SHLCK 32 /* or 4 */ 541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 559317259ead88fe6c05120ae1e3ace99738e2c698Stephen Rothwell#include <asm-generic/fcntl.h> 561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif 58