diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-09-06 18:17:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 19:57:37 -0400 |
commit | 9317259ead88fe6c05120ae1e3ace99738e2c698 (patch) | |
tree | b899748ca57a96d59003945f97ceae01b5fdc48c /include | |
parent | 5ba4d46dc44c5399bc4e7a39239de5a1690848a4 (diff) |
[PATCH] Create asm-generic/fcntl.h
This set of patches creates asm-generic/fcntl.h and consolidates as much as
possible from the asm-*/fcntl.h files into it.
This patch just gathers all the identical bits of the asm-*/fcntl.h files into
asm-generic/fcntl.h.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-alpha/fcntl.h | 25 | ||||
-rw-r--r-- | include/asm-arm/fcntl.h | 27 | ||||
-rw-r--r-- | include/asm-arm26/fcntl.h | 27 | ||||
-rw-r--r-- | include/asm-cris/fcntl.h | 26 | ||||
-rw-r--r-- | include/asm-frv/fcntl.h | 27 | ||||
-rw-r--r-- | include/asm-generic/fcntl.h | 32 | ||||
-rw-r--r-- | include/asm-h8300/fcntl.h | 27 | ||||
-rw-r--r-- | include/asm-i386/fcntl.h | 26 | ||||
-rw-r--r-- | include/asm-ia64/fcntl.h | 28 | ||||
-rw-r--r-- | include/asm-m32r/fcntl.h | 26 | ||||
-rw-r--r-- | include/asm-m68k/fcntl.h | 27 | ||||
-rw-r--r-- | include/asm-mips/fcntl.h | 28 | ||||
-rw-r--r-- | include/asm-parisc/fcntl.h | 26 | ||||
-rw-r--r-- | include/asm-ppc/fcntl.h | 27 | ||||
-rw-r--r-- | include/asm-ppc64/fcntl.h | 26 | ||||
-rw-r--r-- | include/asm-s390/fcntl.h | 28 | ||||
-rw-r--r-- | include/asm-sh/fcntl.h | 27 | ||||
-rw-r--r-- | include/asm-sparc/fcntl.h | 27 | ||||
-rw-r--r-- | include/asm-sparc64/fcntl.h | 26 | ||||
-rw-r--r-- | include/asm-v850/fcntl.h | 27 | ||||
-rw-r--r-- | include/asm-x86_64/fcntl.h | 26 | ||||
-rw-r--r-- | include/asm-xtensa/fcntl.h | 26 |
22 files changed, 66 insertions, 526 deletions
diff --git a/include/asm-alpha/fcntl.h b/include/asm-alpha/fcntl.h index 6b7d6c1649ce..3f3ad49e8365 100644 --- a/include/asm-alpha/fcntl.h +++ b/include/asm-alpha/fcntl.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_ACCMODE 0003 | ||
7 | #define O_RDONLY 00 | ||
8 | #define O_WRONLY 01 | ||
9 | #define O_RDWR 02 | ||
10 | #define O_CREAT 01000 /* not fcntl */ | 6 | #define O_CREAT 01000 /* not fcntl */ |
11 | #define O_TRUNC 02000 /* not fcntl */ | 7 | #define O_TRUNC 02000 /* not fcntl */ |
12 | #define O_EXCL 04000 /* not fcntl */ | 8 | #define O_EXCL 04000 /* not fcntl */ |
@@ -23,11 +19,6 @@ | |||
23 | #define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */ | 19 | #define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */ |
24 | #define O_NOATIME 04000000 | 20 | #define O_NOATIME 04000000 |
25 | 21 | ||
26 | #define F_DUPFD 0 /* dup */ | ||
27 | #define F_GETFD 1 /* get close_on_exec */ | ||
28 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
29 | #define F_GETFL 3 /* get file->f_flags */ | ||
30 | #define F_SETFL 4 /* set file->f_flags */ | ||
31 | #define F_GETLK 7 | 22 | #define F_GETLK 7 |
32 | #define F_SETLK 8 | 23 | #define F_SETLK 8 |
33 | #define F_SETLKW 9 | 24 | #define F_SETLKW 9 |
@@ -37,9 +28,6 @@ | |||
37 | #define F_SETSIG 10 /* for sockets. */ | 28 | #define F_SETSIG 10 /* for sockets. */ |
38 | #define F_GETSIG 11 /* for sockets. */ | 29 | #define F_GETSIG 11 /* for sockets. */ |
39 | 30 | ||
40 | /* for F_[GET|SET]FL */ | ||
41 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
42 | |||
43 | /* for posix fcntl() and lockf() */ | 31 | /* for posix fcntl() and lockf() */ |
44 | #define F_RDLCK 1 | 32 | #define F_RDLCK 1 |
45 | #define F_WRLCK 2 | 33 | #define F_WRLCK 2 |
@@ -51,17 +39,6 @@ | |||
51 | 39 | ||
52 | #define F_INPROGRESS 64 | 40 | #define F_INPROGRESS 64 |
53 | 41 | ||
54 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
55 | #define LOCK_SH 1 /* shared lock */ | ||
56 | #define LOCK_EX 2 /* exclusive lock */ | ||
57 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
58 | blocking */ | ||
59 | #define LOCK_UN 8 /* remove lock */ | ||
60 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
61 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
62 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
63 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
64 | |||
65 | struct flock { | 42 | struct flock { |
66 | short l_type; | 43 | short l_type; |
67 | short l_whence; | 44 | short l_whence; |
@@ -70,6 +47,6 @@ struct flock { | |||
70 | __kernel_pid_t l_pid; | 47 | __kernel_pid_t l_pid; |
71 | }; | 48 | }; |
72 | 49 | ||
73 | #define F_LINUX_SPECIFIC_BASE 1024 | 50 | #include <asm-generic/fcntl.h> |
74 | 51 | ||
75 | #endif | 52 | #endif |
diff --git a/include/asm-arm/fcntl.h b/include/asm-arm/fcntl.h index 485b6bdf4d7a..e6606669cee3 100644 --- a/include/asm-arm/fcntl.h +++ b/include/asm-arm/fcntl.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_ACCMODE 0003 | ||
7 | #define O_RDONLY 00 | ||
8 | #define O_WRONLY 01 | ||
9 | #define O_RDWR 02 | ||
10 | #define O_CREAT 0100 /* not fcntl */ | 6 | #define O_CREAT 0100 /* not fcntl */ |
11 | #define O_EXCL 0200 /* not fcntl */ | 7 | #define O_EXCL 0200 /* not fcntl */ |
12 | #define O_NOCTTY 0400 /* not fcntl */ | 8 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -22,11 +18,6 @@ | |||
22 | #define O_LARGEFILE 0400000 | 18 | #define O_LARGEFILE 0400000 |
23 | #define O_NOATIME 01000000 | 19 | #define O_NOATIME 01000000 |
24 | 20 | ||
25 | #define F_DUPFD 0 /* dup */ | ||
26 | #define F_GETFD 1 /* get close_on_exec */ | ||
27 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
28 | #define F_GETFL 3 /* get file->f_flags */ | ||
29 | #define F_SETFL 4 /* set file->f_flags */ | ||
30 | #define F_GETLK 5 | 21 | #define F_GETLK 5 |
31 | #define F_SETLK 6 | 22 | #define F_SETLK 6 |
32 | #define F_SETLKW 7 | 23 | #define F_SETLKW 7 |
@@ -40,9 +31,6 @@ | |||
40 | #define F_SETLK64 13 | 31 | #define F_SETLK64 13 |
41 | #define F_SETLKW64 14 | 32 | #define F_SETLKW64 14 |
42 | 33 | ||
43 | /* for F_[GET|SET]FL */ | ||
44 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
45 | |||
46 | /* for posix fcntl() and lockf() */ | 34 | /* for posix fcntl() and lockf() */ |
47 | #define F_RDLCK 0 | 35 | #define F_RDLCK 0 |
48 | #define F_WRLCK 1 | 36 | #define F_WRLCK 1 |
@@ -55,18 +43,6 @@ | |||
55 | /* for leases */ | 43 | /* for leases */ |
56 | #define F_INPROGRESS 16 | 44 | #define F_INPROGRESS 16 |
57 | 45 | ||
58 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
59 | #define LOCK_SH 1 /* shared lock */ | ||
60 | #define LOCK_EX 2 /* exclusive lock */ | ||
61 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
62 | blocking */ | ||
63 | #define LOCK_UN 8 /* remove lock */ | ||
64 | |||
65 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
66 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
67 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
68 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
69 | |||
70 | struct flock { | 46 | struct flock { |
71 | short l_type; | 47 | short l_type; |
72 | short l_whence; | 48 | short l_whence; |
@@ -83,5 +59,6 @@ struct flock64 { | |||
83 | pid_t l_pid; | 59 | pid_t l_pid; |
84 | }; | 60 | }; |
85 | 61 | ||
86 | #define F_LINUX_SPECIFIC_BASE 1024 | 62 | #include <asm-generic/fcntl.h> |
63 | |||
87 | #endif | 64 | #endif |
diff --git a/include/asm-arm26/fcntl.h b/include/asm-arm26/fcntl.h index 485b6bdf4d7a..e6606669cee3 100644 --- a/include/asm-arm26/fcntl.h +++ b/include/asm-arm26/fcntl.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_ACCMODE 0003 | ||
7 | #define O_RDONLY 00 | ||
8 | #define O_WRONLY 01 | ||
9 | #define O_RDWR 02 | ||
10 | #define O_CREAT 0100 /* not fcntl */ | 6 | #define O_CREAT 0100 /* not fcntl */ |
11 | #define O_EXCL 0200 /* not fcntl */ | 7 | #define O_EXCL 0200 /* not fcntl */ |
12 | #define O_NOCTTY 0400 /* not fcntl */ | 8 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -22,11 +18,6 @@ | |||
22 | #define O_LARGEFILE 0400000 | 18 | #define O_LARGEFILE 0400000 |
23 | #define O_NOATIME 01000000 | 19 | #define O_NOATIME 01000000 |
24 | 20 | ||
25 | #define F_DUPFD 0 /* dup */ | ||
26 | #define F_GETFD 1 /* get close_on_exec */ | ||
27 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
28 | #define F_GETFL 3 /* get file->f_flags */ | ||
29 | #define F_SETFL 4 /* set file->f_flags */ | ||
30 | #define F_GETLK 5 | 21 | #define F_GETLK 5 |
31 | #define F_SETLK 6 | 22 | #define F_SETLK 6 |
32 | #define F_SETLKW 7 | 23 | #define F_SETLKW 7 |
@@ -40,9 +31,6 @@ | |||
40 | #define F_SETLK64 13 | 31 | #define F_SETLK64 13 |
41 | #define F_SETLKW64 14 | 32 | #define F_SETLKW64 14 |
42 | 33 | ||
43 | /* for F_[GET|SET]FL */ | ||
44 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
45 | |||
46 | /* for posix fcntl() and lockf() */ | 34 | /* for posix fcntl() and lockf() */ |
47 | #define F_RDLCK 0 | 35 | #define F_RDLCK 0 |
48 | #define F_WRLCK 1 | 36 | #define F_WRLCK 1 |
@@ -55,18 +43,6 @@ | |||
55 | /* for leases */ | 43 | /* for leases */ |
56 | #define F_INPROGRESS 16 | 44 | #define F_INPROGRESS 16 |
57 | 45 | ||
58 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
59 | #define LOCK_SH 1 /* shared lock */ | ||
60 | #define LOCK_EX 2 /* exclusive lock */ | ||
61 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
62 | blocking */ | ||
63 | #define LOCK_UN 8 /* remove lock */ | ||
64 | |||
65 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
66 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
67 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
68 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
69 | |||
70 | struct flock { | 46 | struct flock { |
71 | short l_type; | 47 | short l_type; |
72 | short l_whence; | 48 | short l_whence; |
@@ -83,5 +59,6 @@ struct flock64 { | |||
83 | pid_t l_pid; | 59 | pid_t l_pid; |
84 | }; | 60 | }; |
85 | 61 | ||
86 | #define F_LINUX_SPECIFIC_BASE 1024 | 62 | #include <asm-generic/fcntl.h> |
63 | |||
87 | #endif | 64 | #endif |
diff --git a/include/asm-cris/fcntl.h b/include/asm-cris/fcntl.h index 61c563242b51..edde3cc65604 100644 --- a/include/asm-cris/fcntl.h +++ b/include/asm-cris/fcntl.h | |||
@@ -5,10 +5,6 @@ | |||
5 | 5 | ||
6 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 6 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
7 | located on an ext2 file system */ | 7 | located on an ext2 file system */ |
8 | #define O_ACCMODE 0003 | ||
9 | #define O_RDONLY 00 | ||
10 | #define O_WRONLY 01 | ||
11 | #define O_RDWR 02 | ||
12 | #define O_CREAT 0100 /* not fcntl */ | 8 | #define O_CREAT 0100 /* not fcntl */ |
13 | #define O_EXCL 0200 /* not fcntl */ | 9 | #define O_EXCL 0200 /* not fcntl */ |
14 | #define O_NOCTTY 0400 /* not fcntl */ | 10 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -24,11 +20,6 @@ | |||
24 | #define O_NOFOLLOW 0400000 /* don't follow links */ | 20 | #define O_NOFOLLOW 0400000 /* don't follow links */ |
25 | #define O_NOATIME 01000000 | 21 | #define O_NOATIME 01000000 |
26 | 22 | ||
27 | #define F_DUPFD 0 /* dup */ | ||
28 | #define F_GETFD 1 /* get f_flags */ | ||
29 | #define F_SETFD 2 /* set f_flags */ | ||
30 | #define F_GETFL 3 /* more flags (cloexec) */ | ||
31 | #define F_SETFL 4 | ||
32 | #define F_GETLK 5 | 23 | #define F_GETLK 5 |
33 | #define F_SETLK 6 | 24 | #define F_SETLK 6 |
34 | #define F_SETLKW 7 | 25 | #define F_SETLKW 7 |
@@ -42,9 +33,6 @@ | |||
42 | #define F_SETLK64 13 | 33 | #define F_SETLK64 13 |
43 | #define F_SETLKW64 14 | 34 | #define F_SETLKW64 14 |
44 | 35 | ||
45 | /* for F_[GET|SET]FL */ | ||
46 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
47 | |||
48 | /* for posix fcntl() and lockf() */ | 36 | /* for posix fcntl() and lockf() */ |
49 | #define F_RDLCK 0 | 37 | #define F_RDLCK 0 |
50 | #define F_WRLCK 1 | 38 | #define F_WRLCK 1 |
@@ -57,18 +45,6 @@ | |||
57 | /* for leases */ | 45 | /* for leases */ |
58 | #define F_INPROGRESS 16 | 46 | #define F_INPROGRESS 16 |
59 | 47 | ||
60 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
61 | #define LOCK_SH 1 /* shared lock */ | ||
62 | #define LOCK_EX 2 /* exclusive lock */ | ||
63 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
64 | blocking */ | ||
65 | #define LOCK_UN 8 /* remove lock */ | ||
66 | |||
67 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
68 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
69 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
70 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
71 | |||
72 | struct flock { | 48 | struct flock { |
73 | short l_type; | 49 | short l_type; |
74 | short l_whence; | 50 | short l_whence; |
@@ -85,6 +61,6 @@ struct flock64 { | |||
85 | pid_t l_pid; | 61 | pid_t l_pid; |
86 | }; | 62 | }; |
87 | 63 | ||
88 | #define F_LINUX_SPECIFIC_BASE 1024 | 64 | #include <asm-generic/fcntl.h> |
89 | 65 | ||
90 | #endif | 66 | #endif |
diff --git a/include/asm-frv/fcntl.h b/include/asm-frv/fcntl.h index d61b999f9973..e2092dff9d06 100644 --- a/include/asm-frv/fcntl.h +++ b/include/asm-frv/fcntl.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_ACCMODE 0003 | ||
7 | #define O_RDONLY 00 | ||
8 | #define O_WRONLY 01 | ||
9 | #define O_RDWR 02 | ||
10 | #define O_CREAT 0100 /* not fcntl */ | 6 | #define O_CREAT 0100 /* not fcntl */ |
11 | #define O_EXCL 0200 /* not fcntl */ | 7 | #define O_EXCL 0200 /* not fcntl */ |
12 | #define O_NOCTTY 0400 /* not fcntl */ | 8 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -22,11 +18,6 @@ | |||
22 | #define O_NOFOLLOW 0400000 /* don't follow links */ | 18 | #define O_NOFOLLOW 0400000 /* don't follow links */ |
23 | #define O_NOATIME 01000000 | 19 | #define O_NOATIME 01000000 |
24 | 20 | ||
25 | #define F_DUPFD 0 /* dup */ | ||
26 | #define F_GETFD 1 /* get close_on_exec */ | ||
27 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
28 | #define F_GETFL 3 /* get file->f_flags */ | ||
29 | #define F_SETFL 4 /* set file->f_flags */ | ||
30 | #define F_GETLK 5 | 21 | #define F_GETLK 5 |
31 | #define F_SETLK 6 | 22 | #define F_SETLK 6 |
32 | #define F_SETLKW 7 | 23 | #define F_SETLKW 7 |
@@ -40,9 +31,6 @@ | |||
40 | #define F_SETLK64 13 | 31 | #define F_SETLK64 13 |
41 | #define F_SETLKW64 14 | 32 | #define F_SETLKW64 14 |
42 | 33 | ||
43 | /* for F_[GET|SET]FL */ | ||
44 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
45 | |||
46 | /* for posix fcntl() and lockf() */ | 34 | /* for posix fcntl() and lockf() */ |
47 | #define F_RDLCK 0 | 35 | #define F_RDLCK 0 |
48 | #define F_WRLCK 1 | 36 | #define F_WRLCK 1 |
@@ -55,18 +43,6 @@ | |||
55 | /* for leases */ | 43 | /* for leases */ |
56 | #define F_INPROGRESS 16 | 44 | #define F_INPROGRESS 16 |
57 | 45 | ||
58 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
59 | #define LOCK_SH 1 /* shared lock */ | ||
60 | #define LOCK_EX 2 /* exclusive lock */ | ||
61 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
62 | blocking */ | ||
63 | #define LOCK_UN 8 /* remove lock */ | ||
64 | |||
65 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
66 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
67 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
68 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
69 | |||
70 | struct flock { | 46 | struct flock { |
71 | short l_type; | 47 | short l_type; |
72 | short l_whence; | 48 | short l_whence; |
@@ -83,6 +59,7 @@ struct flock64 { | |||
83 | pid_t l_pid; | 59 | pid_t l_pid; |
84 | }; | 60 | }; |
85 | 61 | ||
86 | #define F_LINUX_SPECIFIC_BASE 1024 | 62 | #include <asm-generic/fcntl.h> |
63 | |||
87 | #endif /* _ASM_FCNTL_H */ | 64 | #endif /* _ASM_FCNTL_H */ |
88 | 65 | ||
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h new file mode 100644 index 000000000000..d256c5bb6edc --- /dev/null +++ b/include/asm-generic/fcntl.h | |||
@@ -0,0 +1,32 @@ | |||
1 | #ifndef _ASM_GENERIC_FCNTL_H | ||
2 | #define _ASM_GENERIC_FCNTL_H | ||
3 | |||
4 | #define O_ACCMODE 0003 | ||
5 | #define O_RDONLY 0000 | ||
6 | #define O_WRONLY 0001 | ||
7 | #define O_RDWR 0002 | ||
8 | |||
9 | #define F_DUPFD 0 /* dup */ | ||
10 | #define F_GETFD 1 /* get close_on_exec */ | ||
11 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
12 | #define F_GETFL 3 /* get file->f_flags */ | ||
13 | #define F_SETFL 4 /* set file->f_flags */ | ||
14 | |||
15 | /* for F_[GET|SET]FL */ | ||
16 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
17 | |||
18 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
19 | #define LOCK_SH 1 /* shared lock */ | ||
20 | #define LOCK_EX 2 /* exclusive lock */ | ||
21 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
22 | blocking */ | ||
23 | #define LOCK_UN 8 /* remove lock */ | ||
24 | |||
25 | #define LOCK_MAND 32 /* This is a mandatory flock ... */ | ||
26 | #define LOCK_READ 64 /* which allows concurrent read operations */ | ||
27 | #define LOCK_WRITE 128 /* which allows concurrent write operations */ | ||
28 | #define LOCK_RW 192 /* which allows concurrent read & write ops */ | ||
29 | |||
30 | #define F_LINUX_SPECIFIC_BASE 1024 | ||
31 | |||
32 | #endif /* _ASM_GENERIC_FCNTL_H */ | ||
diff --git a/include/asm-h8300/fcntl.h b/include/asm-h8300/fcntl.h index 355350a57bf9..43803ac89f48 100644 --- a/include/asm-h8300/fcntl.h +++ b/include/asm-h8300/fcntl.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_ACCMODE 0003 | ||
7 | #define O_RDONLY 00 | ||
8 | #define O_WRONLY 01 | ||
9 | #define O_RDWR 02 | ||
10 | #define O_CREAT 0100 /* not fcntl */ | 6 | #define O_CREAT 0100 /* not fcntl */ |
11 | #define O_EXCL 0200 /* not fcntl */ | 7 | #define O_EXCL 0200 /* not fcntl */ |
12 | #define O_NOCTTY 0400 /* not fcntl */ | 8 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -22,11 +18,6 @@ | |||
22 | #define O_LARGEFILE 0400000 | 18 | #define O_LARGEFILE 0400000 |
23 | #define O_NOATIME 01000000 | 19 | #define O_NOATIME 01000000 |
24 | 20 | ||
25 | #define F_DUPFD 0 /* dup */ | ||
26 | #define F_GETFD 1 /* get close_on_exec */ | ||
27 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
28 | #define F_GETFL 3 /* get file->f_flags */ | ||
29 | #define F_SETFL 4 /* set file->f_flags */ | ||
30 | #define F_GETLK 5 | 21 | #define F_GETLK 5 |
31 | #define F_SETLK 6 | 22 | #define F_SETLK 6 |
32 | #define F_SETLKW 7 | 23 | #define F_SETLKW 7 |
@@ -40,9 +31,6 @@ | |||
40 | #define F_SETLK64 13 | 31 | #define F_SETLK64 13 |
41 | #define F_SETLKW64 14 | 32 | #define F_SETLKW64 14 |
42 | 33 | ||
43 | /* for F_[GET|SET]FL */ | ||
44 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
45 | |||
46 | /* for posix fcntl() and lockf() */ | 34 | /* for posix fcntl() and lockf() */ |
47 | #define F_RDLCK 0 | 35 | #define F_RDLCK 0 |
48 | #define F_WRLCK 1 | 36 | #define F_WRLCK 1 |
@@ -55,18 +43,6 @@ | |||
55 | /* for leases */ | 43 | /* for leases */ |
56 | #define F_INPROGRESS 16 | 44 | #define F_INPROGRESS 16 |
57 | 45 | ||
58 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
59 | #define LOCK_SH 1 /* shared lock */ | ||
60 | #define LOCK_EX 2 /* exclusive lock */ | ||
61 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
62 | blocking */ | ||
63 | #define LOCK_UN 8 /* remove lock */ | ||
64 | |||
65 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
66 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
67 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
68 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
69 | |||
70 | struct flock { | 46 | struct flock { |
71 | short l_type; | 47 | short l_type; |
72 | short l_whence; | 48 | short l_whence; |
@@ -83,5 +59,6 @@ struct flock64 { | |||
83 | pid_t l_pid; | 59 | pid_t l_pid; |
84 | }; | 60 | }; |
85 | 61 | ||
86 | #define F_LINUX_SPECIFIC_BASE 1024 | 62 | #include <asm-generic/fcntl.h> |
63 | |||
87 | #endif /* _H8300_FCNTL_H */ | 64 | #endif /* _H8300_FCNTL_H */ |
diff --git a/include/asm-i386/fcntl.h b/include/asm-i386/fcntl.h index 511cde94a3ed..b51233c6a720 100644 --- a/include/asm-i386/fcntl.h +++ b/include/asm-i386/fcntl.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_ACCMODE 0003 | ||
7 | #define O_RDONLY 00 | ||
8 | #define O_WRONLY 01 | ||
9 | #define O_RDWR 02 | ||
10 | #define O_CREAT 0100 /* not fcntl */ | 6 | #define O_CREAT 0100 /* not fcntl */ |
11 | #define O_EXCL 0200 /* not fcntl */ | 7 | #define O_EXCL 0200 /* not fcntl */ |
12 | #define O_NOCTTY 0400 /* not fcntl */ | 8 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -22,11 +18,6 @@ | |||
22 | #define O_NOFOLLOW 0400000 /* don't follow links */ | 18 | #define O_NOFOLLOW 0400000 /* don't follow links */ |
23 | #define O_NOATIME 01000000 | 19 | #define O_NOATIME 01000000 |
24 | 20 | ||
25 | #define F_DUPFD 0 /* dup */ | ||
26 | #define F_GETFD 1 /* get close_on_exec */ | ||
27 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
28 | #define F_GETFL 3 /* get file->f_flags */ | ||
29 | #define F_SETFL 4 /* set file->f_flags */ | ||
30 | #define F_GETLK 5 | 21 | #define F_GETLK 5 |
31 | #define F_SETLK 6 | 22 | #define F_SETLK 6 |
32 | #define F_SETLKW 7 | 23 | #define F_SETLKW 7 |
@@ -40,9 +31,6 @@ | |||
40 | #define F_SETLK64 13 | 31 | #define F_SETLK64 13 |
41 | #define F_SETLKW64 14 | 32 | #define F_SETLKW64 14 |
42 | 33 | ||
43 | /* for F_[GET|SET]FL */ | ||
44 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
45 | |||
46 | /* for posix fcntl() and lockf() */ | 34 | /* for posix fcntl() and lockf() */ |
47 | #define F_RDLCK 0 | 35 | #define F_RDLCK 0 |
48 | #define F_WRLCK 1 | 36 | #define F_WRLCK 1 |
@@ -55,18 +43,6 @@ | |||
55 | /* for leases */ | 43 | /* for leases */ |
56 | #define F_INPROGRESS 16 | 44 | #define F_INPROGRESS 16 |
57 | 45 | ||
58 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
59 | #define LOCK_SH 1 /* shared lock */ | ||
60 | #define LOCK_EX 2 /* exclusive lock */ | ||
61 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
62 | blocking */ | ||
63 | #define LOCK_UN 8 /* remove lock */ | ||
64 | |||
65 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
66 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
67 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
68 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
69 | |||
70 | struct flock { | 46 | struct flock { |
71 | short l_type; | 47 | short l_type; |
72 | short l_whence; | 48 | short l_whence; |
@@ -83,6 +59,6 @@ struct flock64 { | |||
83 | pid_t l_pid; | 59 | pid_t l_pid; |
84 | }; | 60 | }; |
85 | 61 | ||
86 | #define F_LINUX_SPECIFIC_BASE 1024 | 62 | #include <asm-generic/fcntl.h> |
87 | 63 | ||
88 | #endif | 64 | #endif |
diff --git a/include/asm-ia64/fcntl.h b/include/asm-ia64/fcntl.h index cee16ea1780a..9f0ec1e4bd50 100644 --- a/include/asm-ia64/fcntl.h +++ b/include/asm-ia64/fcntl.h | |||
@@ -11,10 +11,6 @@ | |||
11 | * open/fcntl - O_SYNC is only implemented on blocks devices and on | 11 | * open/fcntl - O_SYNC is only implemented on blocks devices and on |
12 | * files located on an ext2 file system | 12 | * files located on an ext2 file system |
13 | */ | 13 | */ |
14 | #define O_ACCMODE 0003 | ||
15 | #define O_RDONLY 00 | ||
16 | #define O_WRONLY 01 | ||
17 | #define O_RDWR 02 | ||
18 | #define O_CREAT 0100 /* not fcntl */ | 14 | #define O_CREAT 0100 /* not fcntl */ |
19 | #define O_EXCL 0200 /* not fcntl */ | 15 | #define O_EXCL 0200 /* not fcntl */ |
20 | #define O_NOCTTY 0400 /* not fcntl */ | 16 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -30,11 +26,6 @@ | |||
30 | #define O_NOFOLLOW 0400000 /* don't follow links */ | 26 | #define O_NOFOLLOW 0400000 /* don't follow links */ |
31 | #define O_NOATIME 01000000 | 27 | #define O_NOATIME 01000000 |
32 | 28 | ||
33 | #define F_DUPFD 0 /* dup */ | ||
34 | #define F_GETFD 1 /* get close_on_exec */ | ||
35 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
36 | #define F_GETFL 3 /* get file->f_flags */ | ||
37 | #define F_SETFL 4 /* set file->f_flags */ | ||
38 | #define F_GETLK 5 | 29 | #define F_GETLK 5 |
39 | #define F_SETLK 6 | 30 | #define F_SETLK 6 |
40 | #define F_SETLKW 7 | 31 | #define F_SETLKW 7 |
@@ -44,9 +35,6 @@ | |||
44 | #define F_SETSIG 10 /* for sockets. */ | 35 | #define F_SETSIG 10 /* for sockets. */ |
45 | #define F_GETSIG 11 /* for sockets. */ | 36 | #define F_GETSIG 11 /* for sockets. */ |
46 | 37 | ||
47 | /* for F_[GET|SET]FL */ | ||
48 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
49 | |||
50 | /* for posix fcntl() and lockf() */ | 38 | /* for posix fcntl() and lockf() */ |
51 | #define F_RDLCK 0 | 39 | #define F_RDLCK 0 |
52 | #define F_WRLCK 1 | 40 | #define F_WRLCK 1 |
@@ -59,18 +47,6 @@ | |||
59 | /* for leases */ | 47 | /* for leases */ |
60 | #define F_INPROGRESS 16 | 48 | #define F_INPROGRESS 16 |
61 | 49 | ||
62 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
63 | #define LOCK_SH 1 /* shared lock */ | ||
64 | #define LOCK_EX 2 /* exclusive lock */ | ||
65 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
66 | blocking */ | ||
67 | #define LOCK_UN 8 /* remove lock */ | ||
68 | |||
69 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
70 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
71 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
72 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
73 | |||
74 | struct flock { | 50 | struct flock { |
75 | short l_type; | 51 | short l_type; |
76 | short l_whence; | 52 | short l_whence; |
@@ -79,9 +55,9 @@ struct flock { | |||
79 | pid_t l_pid; | 55 | pid_t l_pid; |
80 | }; | 56 | }; |
81 | 57 | ||
82 | #define F_LINUX_SPECIFIC_BASE 1024 | ||
83 | |||
84 | #define force_o_largefile() \ | 58 | #define force_o_largefile() \ |
85 | (personality(current->personality) != PER_LINUX32) | 59 | (personality(current->personality) != PER_LINUX32) |
86 | 60 | ||
61 | #include <asm-generic/fcntl.h> | ||
62 | |||
87 | #endif /* _ASM_IA64_FCNTL_H */ | 63 | #endif /* _ASM_IA64_FCNTL_H */ |
diff --git a/include/asm-m32r/fcntl.h b/include/asm-m32r/fcntl.h index 3e3089572028..3372bf915547 100644 --- a/include/asm-m32r/fcntl.h +++ b/include/asm-m32r/fcntl.h | |||
@@ -7,10 +7,6 @@ | |||
7 | 7 | ||
8 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 8 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
9 | located on an ext2 file system */ | 9 | located on an ext2 file system */ |
10 | #define O_ACCMODE 0003 | ||
11 | #define O_RDONLY 00 | ||
12 | #define O_WRONLY 01 | ||
13 | #define O_RDWR 02 | ||
14 | #define O_CREAT 0100 /* not fcntl */ | 10 | #define O_CREAT 0100 /* not fcntl */ |
15 | #define O_EXCL 0200 /* not fcntl */ | 11 | #define O_EXCL 0200 /* not fcntl */ |
16 | #define O_NOCTTY 0400 /* not fcntl */ | 12 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -26,11 +22,6 @@ | |||
26 | #define O_NOFOLLOW 0400000 /* don't follow links */ | 22 | #define O_NOFOLLOW 0400000 /* don't follow links */ |
27 | #define O_NOATIME 01000000 | 23 | #define O_NOATIME 01000000 |
28 | 24 | ||
29 | #define F_DUPFD 0 /* dup */ | ||
30 | #define F_GETFD 1 /* get close_on_exec */ | ||
31 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
32 | #define F_GETFL 3 /* get file->f_flags */ | ||
33 | #define F_SETFL 4 /* set file->f_flags */ | ||
34 | #define F_GETLK 5 | 25 | #define F_GETLK 5 |
35 | #define F_SETLK 6 | 26 | #define F_SETLK 6 |
36 | #define F_SETLKW 7 | 27 | #define F_SETLKW 7 |
@@ -44,9 +35,6 @@ | |||
44 | #define F_SETLK64 13 | 35 | #define F_SETLK64 13 |
45 | #define F_SETLKW64 14 | 36 | #define F_SETLKW64 14 |
46 | 37 | ||
47 | /* for F_[GET|SET]FL */ | ||
48 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
49 | |||
50 | /* for posix fcntl() and lockf() */ | 38 | /* for posix fcntl() and lockf() */ |
51 | #define F_RDLCK 0 | 39 | #define F_RDLCK 0 |
52 | #define F_WRLCK 1 | 40 | #define F_WRLCK 1 |
@@ -59,18 +47,6 @@ | |||
59 | /* for leases */ | 47 | /* for leases */ |
60 | #define F_INPROGRESS 16 | 48 | #define F_INPROGRESS 16 |
61 | 49 | ||
62 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
63 | #define LOCK_SH 1 /* shared lock */ | ||
64 | #define LOCK_EX 2 /* exclusive lock */ | ||
65 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
66 | blocking */ | ||
67 | #define LOCK_UN 8 /* remove lock */ | ||
68 | |||
69 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
70 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
71 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
72 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
73 | |||
74 | struct flock { | 50 | struct flock { |
75 | short l_type; | 51 | short l_type; |
76 | short l_whence; | 52 | short l_whence; |
@@ -87,6 +63,6 @@ struct flock64 { | |||
87 | pid_t l_pid; | 63 | pid_t l_pid; |
88 | }; | 64 | }; |
89 | 65 | ||
90 | #define F_LINUX_SPECIFIC_BASE 1024 | 66 | #include <asm-generic/fcntl.h> |
91 | 67 | ||
92 | #endif /* _ASM_M32R_FCNTL_H */ | 68 | #endif /* _ASM_M32R_FCNTL_H */ |
diff --git a/include/asm-m68k/fcntl.h b/include/asm-m68k/fcntl.h index 0d4212983a33..8051f38ecc8d 100644 --- a/include/asm-m68k/fcntl.h +++ b/include/asm-m68k/fcntl.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_ACCMODE 0003 | ||
7 | #define O_RDONLY 00 | ||
8 | #define O_WRONLY 01 | ||
9 | #define O_RDWR 02 | ||
10 | #define O_CREAT 0100 /* not fcntl */ | 6 | #define O_CREAT 0100 /* not fcntl */ |
11 | #define O_EXCL 0200 /* not fcntl */ | 7 | #define O_EXCL 0200 /* not fcntl */ |
12 | #define O_NOCTTY 0400 /* not fcntl */ | 8 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -22,11 +18,6 @@ | |||
22 | #define O_LARGEFILE 0400000 | 18 | #define O_LARGEFILE 0400000 |
23 | #define O_NOATIME 01000000 | 19 | #define O_NOATIME 01000000 |
24 | 20 | ||
25 | #define F_DUPFD 0 /* dup */ | ||
26 | #define F_GETFD 1 /* get close_on_exec */ | ||
27 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
28 | #define F_GETFL 3 /* get file->f_flags */ | ||
29 | #define F_SETFL 4 /* set file->f_flags */ | ||
30 | #define F_GETLK 5 | 21 | #define F_GETLK 5 |
31 | #define F_SETLK 6 | 22 | #define F_SETLK 6 |
32 | #define F_SETLKW 7 | 23 | #define F_SETLKW 7 |
@@ -40,9 +31,6 @@ | |||
40 | #define F_SETLK64 13 | 31 | #define F_SETLK64 13 |
41 | #define F_SETLKW64 14 | 32 | #define F_SETLKW64 14 |
42 | 33 | ||
43 | /* for F_[GET|SET]FL */ | ||
44 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
45 | |||
46 | /* for posix fcntl() and lockf() */ | 34 | /* for posix fcntl() and lockf() */ |
47 | #define F_RDLCK 0 | 35 | #define F_RDLCK 0 |
48 | #define F_WRLCK 1 | 36 | #define F_WRLCK 1 |
@@ -55,18 +43,6 @@ | |||
55 | /* for leases */ | 43 | /* for leases */ |
56 | #define F_INPROGRESS 16 | 44 | #define F_INPROGRESS 16 |
57 | 45 | ||
58 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
59 | #define LOCK_SH 1 /* shared lock */ | ||
60 | #define LOCK_EX 2 /* exclusive lock */ | ||
61 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
62 | blocking */ | ||
63 | #define LOCK_UN 8 /* remove lock */ | ||
64 | |||
65 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
66 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
67 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
68 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
69 | |||
70 | struct flock { | 46 | struct flock { |
71 | short l_type; | 47 | short l_type; |
72 | short l_whence; | 48 | short l_whence; |
@@ -83,5 +59,6 @@ struct flock64 { | |||
83 | pid_t l_pid; | 59 | pid_t l_pid; |
84 | }; | 60 | }; |
85 | 61 | ||
86 | #define F_LINUX_SPECIFIC_BASE 1024 | 62 | #include <asm-generic/fcntl.h> |
63 | |||
87 | #endif /* _M68K_FCNTL_H */ | 64 | #endif /* _M68K_FCNTL_H */ |
diff --git a/include/asm-mips/fcntl.h b/include/asm-mips/fcntl.h index 2436392e7990..4b6043f12806 100644 --- a/include/asm-mips/fcntl.h +++ b/include/asm-mips/fcntl.h | |||
@@ -10,10 +10,6 @@ | |||
10 | 10 | ||
11 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 11 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
12 | located on an ext2 file system */ | 12 | located on an ext2 file system */ |
13 | #define O_ACCMODE 0x0003 | ||
14 | #define O_RDONLY 0x0000 | ||
15 | #define O_WRONLY 0x0001 | ||
16 | #define O_RDWR 0x0002 | ||
17 | #define O_APPEND 0x0008 | 13 | #define O_APPEND 0x0008 |
18 | #define O_SYNC 0x0010 | 14 | #define O_SYNC 0x0010 |
19 | #define O_NONBLOCK 0x0080 | 15 | #define O_NONBLOCK 0x0080 |
@@ -30,11 +26,6 @@ | |||
30 | 26 | ||
31 | #define O_NDELAY O_NONBLOCK | 27 | #define O_NDELAY O_NONBLOCK |
32 | 28 | ||
33 | #define F_DUPFD 0 /* dup */ | ||
34 | #define F_GETFD 1 /* get close_on_exec */ | ||
35 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
36 | #define F_GETFL 3 /* get file->f_flags */ | ||
37 | #define F_SETFL 4 /* set file->f_flags */ | ||
38 | #define F_GETLK 14 | 29 | #define F_GETLK 14 |
39 | #define F_SETLK 6 | 30 | #define F_SETLK 6 |
40 | #define F_SETLKW 7 | 31 | #define F_SETLKW 7 |
@@ -50,9 +41,6 @@ | |||
50 | #define F_SETLKW64 35 | 41 | #define F_SETLKW64 35 |
51 | #endif | 42 | #endif |
52 | 43 | ||
53 | /* for F_[GET|SET]FL */ | ||
54 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
55 | |||
56 | /* for posix fcntl() and lockf() */ | 44 | /* for posix fcntl() and lockf() */ |
57 | #define F_RDLCK 0 | 45 | #define F_RDLCK 0 |
58 | #define F_WRLCK 1 | 46 | #define F_WRLCK 1 |
@@ -65,18 +53,6 @@ | |||
65 | /* for leases */ | 53 | /* for leases */ |
66 | #define F_INPROGRESS 16 | 54 | #define F_INPROGRESS 16 |
67 | 55 | ||
68 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
69 | #define LOCK_SH 1 /* shared lock */ | ||
70 | #define LOCK_EX 2 /* exclusive lock */ | ||
71 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
72 | blocking */ | ||
73 | #define LOCK_UN 8 /* remove lock */ | ||
74 | |||
75 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
76 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
77 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
78 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
79 | |||
80 | /* | 56 | /* |
81 | * The flavours of struct flock. "struct flock" is the ABI compliant | 57 | * The flavours of struct flock. "struct flock" is the ABI compliant |
82 | * variant. Finally struct flock64 is the LFS variant of struct flock. As | 58 | * variant. Finally struct flock64 is the LFS variant of struct flock. As |
@@ -86,7 +62,7 @@ | |||
86 | 62 | ||
87 | #ifndef __mips64 | 63 | #ifndef __mips64 |
88 | 64 | ||
89 | typedef struct flock { | 65 | struct flock { |
90 | short l_type; | 66 | short l_type; |
91 | short l_whence; | 67 | short l_whence; |
92 | __kernel_off_t l_start; | 68 | __kernel_off_t l_start; |
@@ -120,6 +96,6 @@ typedef struct flock { | |||
120 | 96 | ||
121 | #endif | 97 | #endif |
122 | 98 | ||
123 | #define F_LINUX_SPECIFIC_BASE 1024 | 99 | #include <asm-generic/fcntl.h> |
124 | 100 | ||
125 | #endif /* _ASM_FCNTL_H */ | 101 | #endif /* _ASM_FCNTL_H */ |
diff --git a/include/asm-parisc/fcntl.h b/include/asm-parisc/fcntl.h index def35230716a..0a4ee6398735 100644 --- a/include/asm-parisc/fcntl.h +++ b/include/asm-parisc/fcntl.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_ACCMODE 00000003 | ||
7 | #define O_RDONLY 00000000 | ||
8 | #define O_WRONLY 00000001 | ||
9 | #define O_RDWR 00000002 | ||
10 | #define O_APPEND 00000010 | 6 | #define O_APPEND 00000010 |
11 | #define O_BLKSEEK 00000100 /* HPUX only */ | 7 | #define O_BLKSEEK 00000100 /* HPUX only */ |
12 | #define O_CREAT 00000400 /* not fcntl */ | 8 | #define O_CREAT 00000400 /* not fcntl */ |
@@ -27,11 +23,6 @@ | |||
27 | #define O_NOFOLLOW 00000200 /* don't follow links */ | 23 | #define O_NOFOLLOW 00000200 /* don't follow links */ |
28 | #define O_INVISIBLE 04000000 /* invisible I/O, for DMAPI/XDSM */ | 24 | #define O_INVISIBLE 04000000 /* invisible I/O, for DMAPI/XDSM */ |
29 | 25 | ||
30 | #define F_DUPFD 0 /* dup */ | ||
31 | #define F_GETFD 1 /* get f_flags */ | ||
32 | #define F_SETFD 2 /* set f_flags */ | ||
33 | #define F_GETFL 3 /* more flags (cloexec) */ | ||
34 | #define F_SETFL 4 | ||
35 | #define F_GETLK 5 | 26 | #define F_GETLK 5 |
36 | #define F_SETLK 6 | 27 | #define F_SETLK 6 |
37 | #define F_SETLKW 7 | 28 | #define F_SETLKW 7 |
@@ -44,9 +35,6 @@ | |||
44 | #define F_SETSIG 13 /* for sockets. */ | 35 | #define F_SETSIG 13 /* for sockets. */ |
45 | #define F_GETSIG 14 /* for sockets. */ | 36 | #define F_GETSIG 14 /* for sockets. */ |
46 | 37 | ||
47 | /* for F_[GET|SET]FL */ | ||
48 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
49 | |||
50 | /* for posix fcntl() and lockf() */ | 38 | /* for posix fcntl() and lockf() */ |
51 | #define F_RDLCK 01 | 39 | #define F_RDLCK 01 |
52 | #define F_WRLCK 02 | 40 | #define F_WRLCK 02 |
@@ -59,18 +47,6 @@ | |||
59 | /* for leases */ | 47 | /* for leases */ |
60 | #define F_INPROGRESS 16 | 48 | #define F_INPROGRESS 16 |
61 | 49 | ||
62 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
63 | #define LOCK_SH 1 /* shared lock */ | ||
64 | #define LOCK_EX 2 /* exclusive lock */ | ||
65 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
66 | blocking */ | ||
67 | #define LOCK_UN 8 /* remove lock */ | ||
68 | |||
69 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
70 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
71 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
72 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
73 | |||
74 | struct flock { | 50 | struct flock { |
75 | short l_type; | 51 | short l_type; |
76 | short l_whence; | 52 | short l_whence; |
@@ -87,6 +63,6 @@ struct flock64 { | |||
87 | pid_t l_pid; | 63 | pid_t l_pid; |
88 | }; | 64 | }; |
89 | 65 | ||
90 | #define F_LINUX_SPECIFIC_BASE 1024 | 66 | #include <asm-generic/fcntl.h> |
91 | 67 | ||
92 | #endif | 68 | #endif |
diff --git a/include/asm-ppc/fcntl.h b/include/asm-ppc/fcntl.h index 5e28e41fb29f..e8c2dc206612 100644 --- a/include/asm-ppc/fcntl.h +++ b/include/asm-ppc/fcntl.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_ACCMODE 0003 | ||
7 | #define O_RDONLY 00 | ||
8 | #define O_WRONLY 01 | ||
9 | #define O_RDWR 02 | ||
10 | #define O_CREAT 0100 /* not fcntl */ | 6 | #define O_CREAT 0100 /* not fcntl */ |
11 | #define O_EXCL 0200 /* not fcntl */ | 7 | #define O_EXCL 0200 /* not fcntl */ |
12 | #define O_NOCTTY 0400 /* not fcntl */ | 8 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -22,11 +18,6 @@ | |||
22 | #define O_DIRECT 0400000 /* direct disk access hint */ | 18 | #define O_DIRECT 0400000 /* direct disk access hint */ |
23 | #define O_NOATIME 01000000 | 19 | #define O_NOATIME 01000000 |
24 | 20 | ||
25 | #define F_DUPFD 0 /* dup */ | ||
26 | #define F_GETFD 1 /* get close_on_exec */ | ||
27 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
28 | #define F_GETFL 3 /* get file->f_flags */ | ||
29 | #define F_SETFL 4 /* set file->f_flags */ | ||
30 | #define F_GETLK 5 | 21 | #define F_GETLK 5 |
31 | #define F_SETLK 6 | 22 | #define F_SETLK 6 |
32 | #define F_SETLKW 7 | 23 | #define F_SETLKW 7 |
@@ -40,9 +31,6 @@ | |||
40 | #define F_SETLK64 13 | 31 | #define F_SETLK64 13 |
41 | #define F_SETLKW64 14 | 32 | #define F_SETLKW64 14 |
42 | 33 | ||
43 | /* for F_[GET|SET]FL */ | ||
44 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
45 | |||
46 | /* for posix fcntl() and lockf() */ | 34 | /* for posix fcntl() and lockf() */ |
47 | #define F_RDLCK 0 | 35 | #define F_RDLCK 0 |
48 | #define F_WRLCK 1 | 36 | #define F_WRLCK 1 |
@@ -55,18 +43,6 @@ | |||
55 | /* for leases */ | 43 | /* for leases */ |
56 | #define F_INPROGRESS 16 | 44 | #define F_INPROGRESS 16 |
57 | 45 | ||
58 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
59 | #define LOCK_SH 1 /* shared lock */ | ||
60 | #define LOCK_EX 2 /* exclusive lock */ | ||
61 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
62 | blocking */ | ||
63 | #define LOCK_UN 8 /* remove lock */ | ||
64 | |||
65 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
66 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
67 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
68 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
69 | |||
70 | #ifdef __KERNEL__ | 46 | #ifdef __KERNEL__ |
71 | #define F_POSIX 1 | 47 | #define F_POSIX 1 |
72 | #define F_FLOCK 2 | 48 | #define F_FLOCK 2 |
@@ -89,5 +65,6 @@ struct flock64 { | |||
89 | pid_t l_pid; | 65 | pid_t l_pid; |
90 | }; | 66 | }; |
91 | 67 | ||
92 | #define F_LINUX_SPECIFIC_BASE 1024 | 68 | #include <asm-generic/fcntl.h> |
69 | |||
93 | #endif | 70 | #endif |
diff --git a/include/asm-ppc64/fcntl.h b/include/asm-ppc64/fcntl.h index 842560d50656..579a5292fd52 100644 --- a/include/asm-ppc64/fcntl.h +++ b/include/asm-ppc64/fcntl.h | |||
@@ -10,10 +10,6 @@ | |||
10 | 10 | ||
11 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 11 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
12 | located on an ext2 file system */ | 12 | located on an ext2 file system */ |
13 | #define O_ACCMODE 0003 | ||
14 | #define O_RDONLY 00 | ||
15 | #define O_WRONLY 01 | ||
16 | #define O_RDWR 02 | ||
17 | #define O_CREAT 0100 /* not fcntl */ | 13 | #define O_CREAT 0100 /* not fcntl */ |
18 | #define O_EXCL 0200 /* not fcntl */ | 14 | #define O_EXCL 0200 /* not fcntl */ |
19 | #define O_NOCTTY 0400 /* not fcntl */ | 15 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -29,11 +25,6 @@ | |||
29 | #define O_DIRECT 0400000 /* direct disk access hint */ | 25 | #define O_DIRECT 0400000 /* direct disk access hint */ |
30 | #define O_NOATIME 01000000 | 26 | #define O_NOATIME 01000000 |
31 | 27 | ||
32 | #define F_DUPFD 0 /* dup */ | ||
33 | #define F_GETFD 1 /* get close_on_exec */ | ||
34 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
35 | #define F_GETFL 3 /* get file->f_flags */ | ||
36 | #define F_SETFL 4 /* set file->f_flags */ | ||
37 | #define F_GETLK 5 | 28 | #define F_GETLK 5 |
38 | #define F_SETLK 6 | 29 | #define F_SETLK 6 |
39 | #define F_SETLKW 7 | 30 | #define F_SETLKW 7 |
@@ -43,9 +34,6 @@ | |||
43 | #define F_SETSIG 10 /* for sockets. */ | 34 | #define F_SETSIG 10 /* for sockets. */ |
44 | #define F_GETSIG 11 /* for sockets. */ | 35 | #define F_GETSIG 11 /* for sockets. */ |
45 | 36 | ||
46 | /* for F_[GET|SET]FL */ | ||
47 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
48 | |||
49 | /* for posix fcntl() and lockf() */ | 37 | /* for posix fcntl() and lockf() */ |
50 | #define F_RDLCK 0 | 38 | #define F_RDLCK 0 |
51 | #define F_WRLCK 1 | 39 | #define F_WRLCK 1 |
@@ -58,18 +46,6 @@ | |||
58 | /* for leases */ | 46 | /* for leases */ |
59 | #define F_INPROGRESS 16 | 47 | #define F_INPROGRESS 16 |
60 | 48 | ||
61 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
62 | #define LOCK_SH 1 /* shared lock */ | ||
63 | #define LOCK_EX 2 /* exclusive lock */ | ||
64 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
65 | blocking */ | ||
66 | #define LOCK_UN 8 /* remove lock */ | ||
67 | |||
68 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
69 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
70 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
71 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
72 | |||
73 | #ifdef __KERNEL__ | 49 | #ifdef __KERNEL__ |
74 | #define F_POSIX 1 | 50 | #define F_POSIX 1 |
75 | #define F_FLOCK 2 | 51 | #define F_FLOCK 2 |
@@ -84,6 +60,6 @@ struct flock { | |||
84 | pid_t l_pid; | 60 | pid_t l_pid; |
85 | }; | 61 | }; |
86 | 62 | ||
87 | #define F_LINUX_SPECIFIC_BASE 1024 | 63 | #include <asm-generic/fcntl.h> |
88 | 64 | ||
89 | #endif /* _PPC64_FCNTL_H */ | 65 | #endif /* _PPC64_FCNTL_H */ |
diff --git a/include/asm-s390/fcntl.h b/include/asm-s390/fcntl.h index 48f692b45732..159979f35097 100644 --- a/include/asm-s390/fcntl.h +++ b/include/asm-s390/fcntl.h | |||
@@ -10,10 +10,6 @@ | |||
10 | 10 | ||
11 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 11 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
12 | located on an ext2 file system */ | 12 | located on an ext2 file system */ |
13 | #define O_ACCMODE 0003 | ||
14 | #define O_RDONLY 00 | ||
15 | #define O_WRONLY 01 | ||
16 | #define O_RDWR 02 | ||
17 | #define O_CREAT 0100 /* not fcntl */ | 13 | #define O_CREAT 0100 /* not fcntl */ |
18 | #define O_EXCL 0200 /* not fcntl */ | 14 | #define O_EXCL 0200 /* not fcntl */ |
19 | #define O_NOCTTY 0400 /* not fcntl */ | 15 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -29,11 +25,6 @@ | |||
29 | #define O_NOFOLLOW 0400000 /* don't follow links */ | 25 | #define O_NOFOLLOW 0400000 /* don't follow links */ |
30 | #define O_NOATIME 01000000 | 26 | #define O_NOATIME 01000000 |
31 | 27 | ||
32 | #define F_DUPFD 0 /* dup */ | ||
33 | #define F_GETFD 1 /* get close_on_exec */ | ||
34 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
35 | #define F_GETFL 3 /* get file->f_flags */ | ||
36 | #define F_SETFL 4 /* set file->f_flags */ | ||
37 | #define F_GETLK 5 | 28 | #define F_GETLK 5 |
38 | #define F_SETLK 6 | 29 | #define F_SETLK 6 |
39 | #define F_SETLKW 7 | 30 | #define F_SETLKW 7 |
@@ -49,9 +40,6 @@ | |||
49 | #define F_SETLKW64 14 | 40 | #define F_SETLKW64 14 |
50 | #endif /* ! __s390x__ */ | 41 | #endif /* ! __s390x__ */ |
51 | 42 | ||
52 | /* for F_[GET|SET]FL */ | ||
53 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
54 | |||
55 | /* for posix fcntl() and lockf() */ | 43 | /* for posix fcntl() and lockf() */ |
56 | #define F_RDLCK 0 | 44 | #define F_RDLCK 0 |
57 | #define F_WRLCK 1 | 45 | #define F_WRLCK 1 |
@@ -64,18 +52,6 @@ | |||
64 | /* for leases */ | 52 | /* for leases */ |
65 | #define F_INPROGRESS 16 | 53 | #define F_INPROGRESS 16 |
66 | 54 | ||
67 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
68 | #define LOCK_SH 1 /* shared lock */ | ||
69 | #define LOCK_EX 2 /* exclusive lock */ | ||
70 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
71 | blocking */ | ||
72 | #define LOCK_UN 8 /* remove lock */ | ||
73 | |||
74 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
75 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
76 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
77 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
78 | |||
79 | struct flock { | 55 | struct flock { |
80 | short l_type; | 56 | short l_type; |
81 | short l_whence; | 57 | short l_whence; |
@@ -93,5 +69,7 @@ struct flock64 { | |||
93 | pid_t l_pid; | 69 | pid_t l_pid; |
94 | }; | 70 | }; |
95 | #endif | 71 | #endif |
96 | #define F_LINUX_SPECIFIC_BASE 1024 | 72 | |
73 | #include <asm-generic/fcntl.h> | ||
74 | |||
97 | #endif | 75 | #endif |
diff --git a/include/asm-sh/fcntl.h b/include/asm-sh/fcntl.h index 0b3ae524e34c..7c256734cf14 100644 --- a/include/asm-sh/fcntl.h +++ b/include/asm-sh/fcntl.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_ACCMODE 0003 | ||
7 | #define O_RDONLY 00 | ||
8 | #define O_WRONLY 01 | ||
9 | #define O_RDWR 02 | ||
10 | #define O_CREAT 0100 /* not fcntl */ | 6 | #define O_CREAT 0100 /* not fcntl */ |
11 | #define O_EXCL 0200 /* not fcntl */ | 7 | #define O_EXCL 0200 /* not fcntl */ |
12 | #define O_NOCTTY 0400 /* not fcntl */ | 8 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -22,11 +18,6 @@ | |||
22 | #define O_NOFOLLOW 0400000 /* don't follow links */ | 18 | #define O_NOFOLLOW 0400000 /* don't follow links */ |
23 | #define O_NOATIME 01000000 | 19 | #define O_NOATIME 01000000 |
24 | 20 | ||
25 | #define F_DUPFD 0 /* dup */ | ||
26 | #define F_GETFD 1 /* get close_on_exec */ | ||
27 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
28 | #define F_GETFL 3 /* get file->f_flags */ | ||
29 | #define F_SETFL 4 /* set file->f_flags */ | ||
30 | #define F_GETLK 5 | 21 | #define F_GETLK 5 |
31 | #define F_SETLK 6 | 22 | #define F_SETLK 6 |
32 | #define F_SETLKW 7 | 23 | #define F_SETLKW 7 |
@@ -40,9 +31,6 @@ | |||
40 | #define F_SETLK64 13 | 31 | #define F_SETLK64 13 |
41 | #define F_SETLKW64 14 | 32 | #define F_SETLKW64 14 |
42 | 33 | ||
43 | /* for F_[GET|SET]FL */ | ||
44 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
45 | |||
46 | /* for posix fcntl() and lockf() */ | 34 | /* for posix fcntl() and lockf() */ |
47 | #define F_RDLCK 0 | 35 | #define F_RDLCK 0 |
48 | #define F_WRLCK 1 | 36 | #define F_WRLCK 1 |
@@ -55,18 +43,6 @@ | |||
55 | /* for leases */ | 43 | /* for leases */ |
56 | #define F_INPROGRESS 16 | 44 | #define F_INPROGRESS 16 |
57 | 45 | ||
58 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
59 | #define LOCK_SH 1 /* shared lock */ | ||
60 | #define LOCK_EX 2 /* exclusive lock */ | ||
61 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
62 | blocking */ | ||
63 | #define LOCK_UN 8 /* remove lock */ | ||
64 | |||
65 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
66 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
67 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
68 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
69 | |||
70 | struct flock { | 46 | struct flock { |
71 | short l_type; | 47 | short l_type; |
72 | short l_whence; | 48 | short l_whence; |
@@ -83,6 +59,7 @@ struct flock64 { | |||
83 | pid_t l_pid; | 59 | pid_t l_pid; |
84 | }; | 60 | }; |
85 | 61 | ||
86 | #define F_LINUX_SPECIFIC_BASE 1024 | 62 | #include <asm-generic/fcntl.h> |
63 | |||
87 | #endif /* __ASM_SH_FCNTL_H */ | 64 | #endif /* __ASM_SH_FCNTL_H */ |
88 | 65 | ||
diff --git a/include/asm-sparc/fcntl.h b/include/asm-sparc/fcntl.h index df9c75d41d68..68d3fd9156fd 100644 --- a/include/asm-sparc/fcntl.h +++ b/include/asm-sparc/fcntl.h | |||
@@ -4,10 +4,6 @@ | |||
4 | 4 | ||
5 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 5 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
6 | located on an ext2 file system */ | 6 | located on an ext2 file system */ |
7 | #define O_RDONLY 0x0000 | ||
8 | #define O_WRONLY 0x0001 | ||
9 | #define O_RDWR 0x0002 | ||
10 | #define O_ACCMODE 0x0003 | ||
11 | #define O_APPEND 0x0008 | 7 | #define O_APPEND 0x0008 |
12 | #define FASYNC 0x0040 /* fcntl, for BSD compatibility */ | 8 | #define FASYNC 0x0040 /* fcntl, for BSD compatibility */ |
13 | #define O_CREAT 0x0200 /* not fcntl */ | 9 | #define O_CREAT 0x0200 /* not fcntl */ |
@@ -23,11 +19,6 @@ | |||
23 | #define O_DIRECT 0x100000 /* direct disk access hint */ | 19 | #define O_DIRECT 0x100000 /* direct disk access hint */ |
24 | #define O_NOATIME 0x200000 | 20 | #define O_NOATIME 0x200000 |
25 | 21 | ||
26 | #define F_DUPFD 0 /* dup */ | ||
27 | #define F_GETFD 1 /* get close_on_exec */ | ||
28 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
29 | #define F_GETFL 3 /* get file->f_flags */ | ||
30 | #define F_SETFL 4 /* set file->f_flags */ | ||
31 | #define F_GETOWN 5 /* for sockets. */ | 22 | #define F_GETOWN 5 /* for sockets. */ |
32 | #define F_SETOWN 6 /* for sockets. */ | 23 | #define F_SETOWN 6 /* for sockets. */ |
33 | #define F_GETLK 7 | 24 | #define F_GETLK 7 |
@@ -40,9 +31,6 @@ | |||
40 | #define F_SETLK64 13 | 31 | #define F_SETLK64 13 |
41 | #define F_SETLKW64 14 | 32 | #define F_SETLKW64 14 |
42 | 33 | ||
43 | /* for F_[GET|SET]FL */ | ||
44 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
45 | |||
46 | /* for posix fcntl() and lockf() */ | 34 | /* for posix fcntl() and lockf() */ |
47 | #define F_RDLCK 1 | 35 | #define F_RDLCK 1 |
48 | #define F_WRLCK 2 | 36 | #define F_WRLCK 2 |
@@ -55,18 +43,6 @@ | |||
55 | /* for leases */ | 43 | /* for leases */ |
56 | #define F_INPROGRESS 16 | 44 | #define F_INPROGRESS 16 |
57 | 45 | ||
58 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
59 | #define LOCK_SH 1 /* shared lock */ | ||
60 | #define LOCK_EX 2 /* exclusive lock */ | ||
61 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
62 | blocking */ | ||
63 | #define LOCK_UN 8 /* remove lock */ | ||
64 | |||
65 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
66 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
67 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
68 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
69 | |||
70 | struct flock { | 46 | struct flock { |
71 | short l_type; | 47 | short l_type; |
72 | short l_whence; | 48 | short l_whence; |
@@ -85,5 +61,6 @@ struct flock64 { | |||
85 | short __unused; | 61 | short __unused; |
86 | }; | 62 | }; |
87 | 63 | ||
88 | #define F_LINUX_SPECIFIC_BASE 1024 | 64 | #include <asm-generic/fcntl.h> |
65 | |||
89 | #endif | 66 | #endif |
diff --git a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h index e36def0d0d80..a8c543d1ebf9 100644 --- a/include/asm-sparc64/fcntl.h +++ b/include/asm-sparc64/fcntl.h | |||
@@ -4,10 +4,6 @@ | |||
4 | 4 | ||
5 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 5 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
6 | located on an ext2 file system */ | 6 | located on an ext2 file system */ |
7 | #define O_RDONLY 0x0000 | ||
8 | #define O_WRONLY 0x0001 | ||
9 | #define O_RDWR 0x0002 | ||
10 | #define O_ACCMODE 0x0003 | ||
11 | #define O_NDELAY 0x0004 | 7 | #define O_NDELAY 0x0004 |
12 | #define O_APPEND 0x0008 | 8 | #define O_APPEND 0x0008 |
13 | #define FASYNC 0x0040 /* fcntl, for BSD compatibility */ | 9 | #define FASYNC 0x0040 /* fcntl, for BSD compatibility */ |
@@ -24,11 +20,6 @@ | |||
24 | #define O_NOATIME 0x200000 | 20 | #define O_NOATIME 0x200000 |
25 | 21 | ||
26 | 22 | ||
27 | #define F_DUPFD 0 /* dup */ | ||
28 | #define F_GETFD 1 /* get close_on_exec */ | ||
29 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
30 | #define F_GETFL 3 /* get file->f_flags */ | ||
31 | #define F_SETFL 4 /* set file->f_flags */ | ||
32 | #define F_GETOWN 5 /* for sockets. */ | 23 | #define F_GETOWN 5 /* for sockets. */ |
33 | #define F_SETOWN 6 /* for sockets. */ | 24 | #define F_SETOWN 6 /* for sockets. */ |
34 | #define F_GETLK 7 | 25 | #define F_GETLK 7 |
@@ -37,9 +28,6 @@ | |||
37 | #define F_SETSIG 10 /* for sockets. */ | 28 | #define F_SETSIG 10 /* for sockets. */ |
38 | #define F_GETSIG 11 /* for sockets. */ | 29 | #define F_GETSIG 11 /* for sockets. */ |
39 | 30 | ||
40 | /* for F_[GET|SET]FL */ | ||
41 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
42 | |||
43 | /* for posix fcntl() and lockf() */ | 31 | /* for posix fcntl() and lockf() */ |
44 | #define F_RDLCK 1 | 32 | #define F_RDLCK 1 |
45 | #define F_WRLCK 2 | 33 | #define F_WRLCK 2 |
@@ -52,18 +40,6 @@ | |||
52 | /* for leases */ | 40 | /* for leases */ |
53 | #define F_INPROGRESS 16 | 41 | #define F_INPROGRESS 16 |
54 | 42 | ||
55 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
56 | #define LOCK_SH 1 /* shared lock */ | ||
57 | #define LOCK_EX 2 /* exclusive lock */ | ||
58 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
59 | blocking */ | ||
60 | #define LOCK_UN 8 /* remove lock */ | ||
61 | |||
62 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
63 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
64 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
65 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
66 | |||
67 | struct flock { | 43 | struct flock { |
68 | short l_type; | 44 | short l_type; |
69 | short l_whence; | 45 | short l_whence; |
@@ -73,6 +49,6 @@ struct flock { | |||
73 | short __unused; | 49 | short __unused; |
74 | }; | 50 | }; |
75 | 51 | ||
76 | #define F_LINUX_SPECIFIC_BASE 1024 | 52 | #include <asm-generic/fcntl.h> |
77 | 53 | ||
78 | #endif /* !(_SPARC64_FCNTL_H) */ | 54 | #endif /* !(_SPARC64_FCNTL_H) */ |
diff --git a/include/asm-v850/fcntl.h b/include/asm-v850/fcntl.h index 31d4b5961221..1a39a0cb9ce5 100644 --- a/include/asm-v850/fcntl.h +++ b/include/asm-v850/fcntl.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_ACCMODE 0003 | ||
7 | #define O_RDONLY 00 | ||
8 | #define O_WRONLY 01 | ||
9 | #define O_RDWR 02 | ||
10 | #define O_CREAT 0100 /* not fcntl */ | 6 | #define O_CREAT 0100 /* not fcntl */ |
11 | #define O_EXCL 0200 /* not fcntl */ | 7 | #define O_EXCL 0200 /* not fcntl */ |
12 | #define O_NOCTTY 0400 /* not fcntl */ | 8 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -22,11 +18,6 @@ | |||
22 | #define O_LARGEFILE 0400000 | 18 | #define O_LARGEFILE 0400000 |
23 | #define O_NOATIME 01000000 | 19 | #define O_NOATIME 01000000 |
24 | 20 | ||
25 | #define F_DUPFD 0 /* dup */ | ||
26 | #define F_GETFD 1 /* get close_on_exec */ | ||
27 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
28 | #define F_GETFL 3 /* get file->f_flags */ | ||
29 | #define F_SETFL 4 /* set file->f_flags */ | ||
30 | #define F_GETLK 5 | 21 | #define F_GETLK 5 |
31 | #define F_SETLK 6 | 22 | #define F_SETLK 6 |
32 | #define F_SETLKW 7 | 23 | #define F_SETLKW 7 |
@@ -40,9 +31,6 @@ | |||
40 | #define F_SETLK64 13 | 31 | #define F_SETLK64 13 |
41 | #define F_SETLKW64 14 | 32 | #define F_SETLKW64 14 |
42 | 33 | ||
43 | /* for F_[GET|SET]FL */ | ||
44 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
45 | |||
46 | /* for posix fcntl() and lockf() */ | 34 | /* for posix fcntl() and lockf() */ |
47 | #define F_RDLCK 0 | 35 | #define F_RDLCK 0 |
48 | #define F_WRLCK 1 | 36 | #define F_WRLCK 1 |
@@ -55,18 +43,6 @@ | |||
55 | /* for leases */ | 43 | /* for leases */ |
56 | #define F_INPROGRESS 16 | 44 | #define F_INPROGRESS 16 |
57 | 45 | ||
58 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
59 | #define LOCK_SH 1 /* shared lock */ | ||
60 | #define LOCK_EX 2 /* exclusive lock */ | ||
61 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
62 | blocking */ | ||
63 | #define LOCK_UN 8 /* remove lock */ | ||
64 | |||
65 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
66 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
67 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
68 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
69 | |||
70 | struct flock { | 46 | struct flock { |
71 | short l_type; | 47 | short l_type; |
72 | short l_whence; | 48 | short l_whence; |
@@ -83,5 +59,6 @@ struct flock64 { | |||
83 | pid_t l_pid; | 59 | pid_t l_pid; |
84 | }; | 60 | }; |
85 | 61 | ||
86 | #define F_LINUX_SPECIFIC_BASE 1024 | 62 | #include <asm-generic/fcntl.h> |
63 | |||
87 | #endif /* __V850_FCNTL_H__ */ | 64 | #endif /* __V850_FCNTL_H__ */ |
diff --git a/include/asm-x86_64/fcntl.h b/include/asm-x86_64/fcntl.h index 4411f221c037..f58d8d1d9b2f 100644 --- a/include/asm-x86_64/fcntl.h +++ b/include/asm-x86_64/fcntl.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
5 | located on an ext2 file system */ | 5 | located on an ext2 file system */ |
6 | #define O_ACCMODE 0003 | ||
7 | #define O_RDONLY 00 | ||
8 | #define O_WRONLY 01 | ||
9 | #define O_RDWR 02 | ||
10 | #define O_CREAT 0100 /* not fcntl */ | 6 | #define O_CREAT 0100 /* not fcntl */ |
11 | #define O_EXCL 0200 /* not fcntl */ | 7 | #define O_EXCL 0200 /* not fcntl */ |
12 | #define O_NOCTTY 0400 /* not fcntl */ | 8 | #define O_NOCTTY 0400 /* not fcntl */ |
@@ -22,11 +18,6 @@ | |||
22 | #define O_NOFOLLOW 0400000 /* don't follow links */ | 18 | #define O_NOFOLLOW 0400000 /* don't follow links */ |
23 | #define O_NOATIME 01000000 | 19 | #define O_NOATIME 01000000 |
24 | 20 | ||
25 | #define F_DUPFD 0 /* dup */ | ||
26 | #define F_GETFD 1 /* get close_on_exec */ | ||
27 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
28 | #define F_GETFL 3 /* get file->f_flags */ | ||
29 | #define F_SETFL 4 /* set file->f_flags */ | ||
30 | #define F_GETLK 5 | 21 | #define F_GETLK 5 |
31 | #define F_SETLK 6 | 22 | #define F_SETLK 6 |
32 | #define F_SETLKW 7 | 23 | #define F_SETLKW 7 |
@@ -36,9 +27,6 @@ | |||
36 | #define F_SETSIG 10 /* for sockets. */ | 27 | #define F_SETSIG 10 /* for sockets. */ |
37 | #define F_GETSIG 11 /* for sockets. */ | 28 | #define F_GETSIG 11 /* for sockets. */ |
38 | 29 | ||
39 | /* for F_[GET|SET]FL */ | ||
40 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
41 | |||
42 | /* for posix fcntl() and lockf() */ | 30 | /* for posix fcntl() and lockf() */ |
43 | #define F_RDLCK 0 | 31 | #define F_RDLCK 0 |
44 | #define F_WRLCK 1 | 32 | #define F_WRLCK 1 |
@@ -51,18 +39,6 @@ | |||
51 | /* for leases */ | 39 | /* for leases */ |
52 | #define F_INPROGRESS 16 | 40 | #define F_INPROGRESS 16 |
53 | 41 | ||
54 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
55 | #define LOCK_SH 1 /* shared lock */ | ||
56 | #define LOCK_EX 2 /* exclusive lock */ | ||
57 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
58 | blocking */ | ||
59 | #define LOCK_UN 8 /* remove lock */ | ||
60 | |||
61 | #define LOCK_MAND 32 /* This is a mandatory flock */ | ||
62 | #define LOCK_READ 64 /* ... Which allows concurrent read operations */ | ||
63 | #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ | ||
64 | #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ | ||
65 | |||
66 | struct flock { | 42 | struct flock { |
67 | short l_type; | 43 | short l_type; |
68 | short l_whence; | 44 | short l_whence; |
@@ -71,6 +47,6 @@ struct flock { | |||
71 | pid_t l_pid; | 47 | pid_t l_pid; |
72 | }; | 48 | }; |
73 | 49 | ||
74 | #define F_LINUX_SPECIFIC_BASE 1024 | 50 | #include <asm-generic/fcntl.h> |
75 | 51 | ||
76 | #endif /* !_X86_64_FCNTL_H */ | 52 | #endif /* !_X86_64_FCNTL_H */ |
diff --git a/include/asm-xtensa/fcntl.h b/include/asm-xtensa/fcntl.h index 48876bb727d2..a5c6e4b6a20e 100644 --- a/include/asm-xtensa/fcntl.h +++ b/include/asm-xtensa/fcntl.h | |||
@@ -14,10 +14,6 @@ | |||
14 | 14 | ||
15 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | 15 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files |
16 | located on an ext2 file system */ | 16 | located on an ext2 file system */ |
17 | #define O_ACCMODE 0x0003 | ||
18 | #define O_RDONLY 0x0000 | ||
19 | #define O_WRONLY 0x0001 | ||
20 | #define O_RDWR 0x0002 | ||
21 | #define O_APPEND 0x0008 | 17 | #define O_APPEND 0x0008 |
22 | #define O_SYNC 0x0010 | 18 | #define O_SYNC 0x0010 |
23 | #define O_NONBLOCK 0x0080 | 19 | #define O_NONBLOCK 0x0080 |
@@ -34,11 +30,6 @@ | |||
34 | 30 | ||
35 | #define O_NDELAY O_NONBLOCK | 31 | #define O_NDELAY O_NONBLOCK |
36 | 32 | ||
37 | #define F_DUPFD 0 /* dup */ | ||
38 | #define F_GETFD 1 /* get close_on_exec */ | ||
39 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
40 | #define F_GETFL 3 /* get file->f_flags */ | ||
41 | #define F_SETFL 4 /* set file->f_flags */ | ||
42 | #define F_GETLK 14 | 33 | #define F_GETLK 14 |
43 | #define F_GETLK64 15 | 34 | #define F_GETLK64 15 |
44 | #define F_SETLK 6 | 35 | #define F_SETLK 6 |
@@ -51,9 +42,6 @@ | |||
51 | #define F_SETSIG 10 /* for sockets. */ | 42 | #define F_SETSIG 10 /* for sockets. */ |
52 | #define F_GETSIG 11 /* for sockets. */ | 43 | #define F_GETSIG 11 /* for sockets. */ |
53 | 44 | ||
54 | /* for F_[GET|SET]FL */ | ||
55 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
56 | |||
57 | /* for posix fcntl() and lockf() */ | 45 | /* for posix fcntl() and lockf() */ |
58 | #define F_RDLCK 0 | 46 | #define F_RDLCK 0 |
59 | #define F_WRLCK 1 | 47 | #define F_WRLCK 1 |
@@ -66,18 +54,6 @@ | |||
66 | /* for leases */ | 54 | /* for leases */ |
67 | #define F_INPROGRESS 16 | 55 | #define F_INPROGRESS 16 |
68 | 56 | ||
69 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
70 | #define LOCK_SH 1 /* shared lock */ | ||
71 | #define LOCK_EX 2 /* exclusive lock */ | ||
72 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
73 | blocking */ | ||
74 | #define LOCK_UN 8 /* remove lock */ | ||
75 | |||
76 | #define LOCK_MAND 32 /* This is a mandatory flock ... */ | ||
77 | #define LOCK_READ 64 /* which allows concurrent read operations */ | ||
78 | #define LOCK_WRITE 128 /* which allows concurrent write operations */ | ||
79 | #define LOCK_RW 192 /* which allows concurrent read & write ops */ | ||
80 | |||
81 | typedef struct flock { | 57 | typedef struct flock { |
82 | short l_type; | 58 | short l_type; |
83 | short l_whence; | 59 | short l_whence; |
@@ -96,6 +72,6 @@ struct flock64 { | |||
96 | pid_t l_pid; | 72 | pid_t l_pid; |
97 | }; | 73 | }; |
98 | 74 | ||
99 | #define F_LINUX_SPECIFIC_BASE 1024 | 75 | #include <asm-generic/fcntl.h> |
100 | 76 | ||
101 | #endif /* _XTENSA_FCNTL_H */ | 77 | #endif /* _XTENSA_FCNTL_H */ |