]> Pileus Git - ~andy/linux/blob - include/asm-s390/fcntl.h
[PATCH] Create asm-generic/fcntl.h
[~andy/linux] / include / asm-s390 / fcntl.h
1 /*
2  *  include/asm-s390/fcntl.h
3  *
4  *  S390 version
5  *
6  *  Derived from "include/asm-i386/fcntl.h"
7  */
8 #ifndef _S390_FCNTL_H
9 #define _S390_FCNTL_H
10
11 /* open/fcntl - O_SYNC is only implemented on blocks devices and on files
12    located on an ext2 file system */
13 #define O_CREAT            0100 /* not fcntl */
14 #define O_EXCL             0200 /* not fcntl */
15 #define O_NOCTTY           0400 /* not fcntl */
16 #define O_TRUNC           01000 /* not fcntl */
17 #define O_APPEND          02000
18 #define O_NONBLOCK        04000
19 #define O_NDELAY        O_NONBLOCK
20 #define O_SYNC           010000
21 #define FASYNC           020000 /* fcntl, for BSD compatibility */
22 #define O_DIRECT         040000 /* direct disk access hint */
23 #define O_LARGEFILE     0100000
24 #define O_DIRECTORY     0200000 /* must be a directory */
25 #define O_NOFOLLOW      0400000 /* don't follow links */
26 #define O_NOATIME       01000000
27
28 #define F_GETLK         5
29 #define F_SETLK         6
30 #define F_SETLKW        7
31
32 #define F_SETOWN        8       /*  for sockets. */
33 #define F_GETOWN        9       /*  for sockets. */
34 #define F_SETSIG        10      /*  for sockets. */
35 #define F_GETSIG        11      /*  for sockets. */
36
37 #ifndef __s390x__
38 #define F_GETLK64       12      /*  using 'struct flock64' */
39 #define F_SETLK64       13
40 #define F_SETLKW64      14
41 #endif /* ! __s390x__ */
42
43 /* for posix fcntl() and lockf() */
44 #define F_RDLCK         0
45 #define F_WRLCK         1
46 #define F_UNLCK         2
47
48 /* for old implementation of bsd flock () */
49 #define F_EXLCK         4       /* or 3 */
50 #define F_SHLCK         8       /* or 4 */
51
52 /* for leases */
53 #define F_INPROGRESS    16
54
55 struct flock {
56         short l_type;
57         short l_whence;
58         off_t l_start;
59         off_t l_len;
60         pid_t l_pid;
61 };
62
63 #ifndef __s390x__
64 struct flock64 {
65         short  l_type;
66         short  l_whence;
67         loff_t l_start;
68         loff_t l_len;
69         pid_t  l_pid;
70 };
71 #endif
72
73 #include <asm-generic/fcntl.h>
74
75 #endif