blob: edde3cc65604fcd7aba346b536640894b3a8ae9e [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _CRIS_FCNTL_H
2#define _CRIS_FCNTL_H
3
4/* verbatim copy of i386 version */
5
6/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
7 located on an ext2 file system */
Linus Torvalds1da177e2005-04-16 15:20:36 -07008#define O_CREAT 0100 /* not fcntl */
9#define O_EXCL 0200 /* not fcntl */
10#define O_NOCTTY 0400 /* not fcntl */
11#define O_TRUNC 01000 /* not fcntl */
12#define O_APPEND 02000
13#define O_NONBLOCK 04000
14#define O_NDELAY O_NONBLOCK
15#define O_SYNC 010000
16#define FASYNC 020000 /* fcntl, for BSD compatibility */
17#define O_DIRECT 040000 /* direct disk access hint - currently ignored */
18#define O_LARGEFILE 0100000
19#define O_DIRECTORY 0200000 /* must be a directory */
20#define O_NOFOLLOW 0400000 /* don't follow links */
21#define O_NOATIME 01000000
22
Linus Torvalds1da177e2005-04-16 15:20:36 -070023#define F_GETLK 5
24#define F_SETLK 6
25#define F_SETLKW 7
26
27#define F_SETOWN 8 /* for sockets. */
28#define F_GETOWN 9 /* for sockets. */
29#define F_SETSIG 10 /* for sockets. */
30#define F_GETSIG 11 /* for sockets. */
31
32#define F_GETLK64 12 /* using 'struct flock64' */
33#define F_SETLK64 13
34#define F_SETLKW64 14
35
Linus Torvalds1da177e2005-04-16 15:20:36 -070036/* for posix fcntl() and lockf() */
37#define F_RDLCK 0
38#define F_WRLCK 1
39#define F_UNLCK 2
40
41/* for old implementation of bsd flock () */
42#define F_EXLCK 4 /* or 3 */
43#define F_SHLCK 8 /* or 4 */
44
45/* for leases */
46#define F_INPROGRESS 16
47
Linus Torvalds1da177e2005-04-16 15:20:36 -070048struct flock {
49 short l_type;
50 short l_whence;
51 off_t l_start;
52 off_t l_len;
53 pid_t l_pid;
54};
55
56struct flock64 {
57 short l_type;
58 short l_whence;
59 loff_t l_start;
60 loff_t l_len;
61 pid_t l_pid;
62};
63
Stephen Rothwell93172592005-09-06 15:17:57 -070064#include <asm-generic/fcntl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070065
66#endif