aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-09-06 18:17:58 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 19:57:38 -0400
commite64ca97fd80a129e538ca42d0b12c379746b83db (patch)
tree196c445874941ffbcca785be713338f647b42d5b /include
parent2b2fa38e5f3f17a5e1ef3fe29a9869d93197ebfd (diff)
[PATCH] Clean up the open flags
This patch puts the most popular of each open flag into asm-generic/fcntl.h and cleans up the arch files. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> 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.h2
-rw-r--r--include/asm-arm/fcntl.h12
-rw-r--r--include/asm-arm26/fcntl.h10
-rw-r--r--include/asm-cris/fcntl.h19
-rw-r--r--include/asm-frv/fcntl.h17
-rw-r--r--include/asm-generic/fcntl.h52
-rw-r--r--include/asm-h8300/fcntl.h12
-rw-r--r--include/asm-i386/fcntl.h17
-rw-r--r--include/asm-ia64/fcntl.h21
-rw-r--r--include/asm-m32r/fcntl.h17
-rw-r--r--include/asm-m68k/fcntl.h12
-rw-r--r--include/asm-mips/fcntl.h8
-rw-r--r--include/asm-parisc/fcntl.h4
-rw-r--r--include/asm-ppc/fcntl.h12
-rw-r--r--include/asm-s390/fcntl.h17
-rw-r--r--include/asm-sh/fcntl.h17
-rw-r--r--include/asm-sparc/fcntl.h2
-rw-r--r--include/asm-sparc64/fcntl.h2
-rw-r--r--include/asm-v850/fcntl.h12
-rw-r--r--include/asm-x86_64/fcntl.h17
-rw-r--r--include/asm-xtensa/fcntl.h5
21 files changed, 48 insertions, 239 deletions
diff --git a/include/asm-alpha/fcntl.h b/include/asm-alpha/fcntl.h
index 3f3ad49e8365..e2aacbbe38bc 100644
--- a/include/asm-alpha/fcntl.h
+++ b/include/asm-alpha/fcntl.h
@@ -10,9 +10,7 @@
10 10
11#define O_NONBLOCK 00004 11#define O_NONBLOCK 00004
12#define O_APPEND 00010 12#define O_APPEND 00010
13#define O_NDELAY O_NONBLOCK
14#define O_SYNC 040000 13#define O_SYNC 040000
15#define FASYNC 020000 /* fcntl, for BSD compatibility */
16#define O_DIRECTORY 0100000 /* must be a directory */ 14#define O_DIRECTORY 0100000 /* must be a directory */
17#define O_NOFOLLOW 0200000 /* don't follow links */ 15#define O_NOFOLLOW 0200000 /* don't follow links */
18#define O_LARGEFILE 0400000 /* will be set by the kernel on every open */ 16#define O_LARGEFILE 0400000 /* will be set by the kernel on every open */
diff --git a/include/asm-arm/fcntl.h b/include/asm-arm/fcntl.h
index e6606669cee3..fca93693957d 100644
--- a/include/asm-arm/fcntl.h
+++ b/include/asm-arm/fcntl.h
@@ -1,22 +1,10 @@
1#ifndef _ARM_FCNTL_H 1#ifndef _ARM_FCNTL_H
2#define _ARM_FCNTL_H 2#define _ARM_FCNTL_H
3 3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_CREAT 0100 /* not fcntl */
7#define O_EXCL 0200 /* not fcntl */
8#define O_NOCTTY 0400 /* not fcntl */
9#define O_TRUNC 01000 /* not fcntl */
10#define O_APPEND 02000
11#define O_NONBLOCK 04000
12#define O_NDELAY O_NONBLOCK
13#define O_SYNC 010000
14#define FASYNC 020000 /* fcntl, for BSD compatibility */
15#define O_DIRECTORY 040000 /* must be a directory */ 4#define O_DIRECTORY 040000 /* must be a directory */
16#define O_NOFOLLOW 0100000 /* don't follow links */ 5#define O_NOFOLLOW 0100000 /* don't follow links */
17#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ 6#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
18#define O_LARGEFILE 0400000 7#define O_LARGEFILE 0400000
19#define O_NOATIME 01000000
20 8
21#define F_GETLK 5 9#define F_GETLK 5
22#define F_SETLK 6 10#define F_SETLK 6
diff --git a/include/asm-arm26/fcntl.h b/include/asm-arm26/fcntl.h
index e6606669cee3..76e44e92632e 100644
--- a/include/asm-arm26/fcntl.h
+++ b/include/asm-arm26/fcntl.h
@@ -3,20 +3,10 @@
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_CREAT 0100 /* not fcntl */
7#define O_EXCL 0200 /* not fcntl */
8#define O_NOCTTY 0400 /* not fcntl */
9#define O_TRUNC 01000 /* not fcntl */
10#define O_APPEND 02000
11#define O_NONBLOCK 04000
12#define O_NDELAY O_NONBLOCK
13#define O_SYNC 010000
14#define FASYNC 020000 /* fcntl, for BSD compatibility */
15#define O_DIRECTORY 040000 /* must be a directory */ 6#define O_DIRECTORY 040000 /* must be a directory */
16#define O_NOFOLLOW 0100000 /* don't follow links */ 7#define O_NOFOLLOW 0100000 /* don't follow links */
17#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ 8#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
18#define O_LARGEFILE 0400000 9#define O_LARGEFILE 0400000
19#define O_NOATIME 01000000
20 10
21#define F_GETLK 5 11#define F_GETLK 5
22#define F_SETLK 6 12#define F_SETLK 6
diff --git a/include/asm-cris/fcntl.h b/include/asm-cris/fcntl.h
index edde3cc65604..562bb11b945e 100644
--- a/include/asm-cris/fcntl.h
+++ b/include/asm-cris/fcntl.h
@@ -1,25 +1,6 @@
1#ifndef _CRIS_FCNTL_H 1#ifndef _CRIS_FCNTL_H
2#define _CRIS_FCNTL_H 2#define _CRIS_FCNTL_H
3 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 */
8#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
23#define F_GETLK 5 4#define F_GETLK 5
24#define F_SETLK 6 5#define F_SETLK 6
25#define F_SETLKW 7 6#define F_SETLKW 7
diff --git a/include/asm-frv/fcntl.h b/include/asm-frv/fcntl.h
index e2092dff9d06..44cae14576e4 100644
--- a/include/asm-frv/fcntl.h
+++ b/include/asm-frv/fcntl.h
@@ -1,23 +1,6 @@
1#ifndef _ASM_FCNTL_H 1#ifndef _ASM_FCNTL_H
2#define _ASM_FCNTL_H 2#define _ASM_FCNTL_H
3 3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_CREAT 0100 /* not fcntl */
7#define O_EXCL 0200 /* not fcntl */
8#define O_NOCTTY 0400 /* not fcntl */
9#define O_TRUNC 01000 /* not fcntl */
10#define O_APPEND 02000
11#define O_NONBLOCK 04000
12#define O_NDELAY O_NONBLOCK
13#define O_SYNC 010000
14#define FASYNC 020000 /* fcntl, for BSD compatibility */
15#define O_DIRECT 040000 /* direct disk access hint */
16#define O_LARGEFILE 0100000
17#define O_DIRECTORY 0200000 /* must be a directory */
18#define O_NOFOLLOW 0400000 /* don't follow links */
19#define O_NOATIME 01000000
20
21#define F_GETLK 5 4#define F_GETLK 5
22#define F_SETLK 6 5#define F_SETLK 6
23#define F_SETLKW 7 6#define F_SETLKW 7
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h
index d256c5bb6edc..f3690e73a40f 100644
--- a/include/asm-generic/fcntl.h
+++ b/include/asm-generic/fcntl.h
@@ -1,10 +1,54 @@
1#ifndef _ASM_GENERIC_FCNTL_H 1#ifndef _ASM_GENERIC_FCNTL_H
2#define _ASM_GENERIC_FCNTL_H 2#define _ASM_GENERIC_FCNTL_H
3 3
4#define O_ACCMODE 0003 4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5#define O_RDONLY 0000 5 located on an ext2 file system */
6#define O_WRONLY 0001 6#define O_ACCMODE 00000003
7#define O_RDWR 0002 7#define O_RDONLY 00000000
8#define O_WRONLY 00000001
9#define O_RDWR 00000002
10#ifndef O_CREAT
11#define O_CREAT 00000100 /* not fcntl */
12#endif
13#ifndef O_EXCL
14#define O_EXCL 00000200 /* not fcntl */
15#endif
16#ifndef O_NOCTTY
17#define O_NOCTTY 00000400 /* not fcntl */
18#endif
19#ifndef O_TRUNC
20#define O_TRUNC 00001000 /* not fcntl */
21#endif
22#ifndef O_APPEND
23#define O_APPEND 00002000
24#endif
25#ifndef O_NONBLOCK
26#define O_NONBLOCK 00004000
27#endif
28#ifndef O_SYNC
29#define O_SYNC 00010000
30#endif
31#ifndef FASYNC
32#define FASYNC 00020000 /* fcntl, for BSD compatibility */
33#endif
34#ifndef O_DIRECT
35#define O_DIRECT 00040000 /* direct disk access hint */
36#endif
37#ifndef O_LARGEFILE
38#define O_LARGEFILE 00100000
39#endif
40#ifndef O_DIRECTORY
41#define O_DIRECTORY 00200000 /* must be a directory */
42#endif
43#ifndef O_NOFOLLOW
44#define O_NOFOLLOW 00400000 /* don't follow links */
45#endif
46#ifndef O_NOATIME
47#define O_NOATIME 01000000
48#endif
49#ifndef O_NDELAY
50#define O_NDELAY O_NONBLOCK
51#endif
8 52
9#define F_DUPFD 0 /* dup */ 53#define F_DUPFD 0 /* dup */
10#define F_GETFD 1 /* get close_on_exec */ 54#define F_GETFD 1 /* get close_on_exec */
diff --git a/include/asm-h8300/fcntl.h b/include/asm-h8300/fcntl.h
index 43803ac89f48..881af9a1ffb7 100644
--- a/include/asm-h8300/fcntl.h
+++ b/include/asm-h8300/fcntl.h
@@ -1,22 +1,10 @@
1#ifndef _H8300_FCNTL_H 1#ifndef _H8300_FCNTL_H
2#define _H8300_FCNTL_H 2#define _H8300_FCNTL_H
3 3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_CREAT 0100 /* not fcntl */
7#define O_EXCL 0200 /* not fcntl */
8#define O_NOCTTY 0400 /* not fcntl */
9#define O_TRUNC 01000 /* not fcntl */
10#define O_APPEND 02000
11#define O_NONBLOCK 04000
12#define O_NDELAY O_NONBLOCK
13#define O_SYNC 010000
14#define FASYNC 020000 /* fcntl, for BSD compatibility */
15#define O_DIRECTORY 040000 /* must be a directory */ 4#define O_DIRECTORY 040000 /* must be a directory */
16#define O_NOFOLLOW 0100000 /* don't follow links */ 5#define O_NOFOLLOW 0100000 /* don't follow links */
17#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ 6#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
18#define O_LARGEFILE 0400000 7#define O_LARGEFILE 0400000
19#define O_NOATIME 01000000
20 8
21#define F_GETLK 5 9#define F_GETLK 5
22#define F_SETLK 6 10#define F_SETLK 6
diff --git a/include/asm-i386/fcntl.h b/include/asm-i386/fcntl.h
index b51233c6a720..4fa08ffde878 100644
--- a/include/asm-i386/fcntl.h
+++ b/include/asm-i386/fcntl.h
@@ -1,23 +1,6 @@
1#ifndef _I386_FCNTL_H 1#ifndef _I386_FCNTL_H
2#define _I386_FCNTL_H 2#define _I386_FCNTL_H
3 3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_CREAT 0100 /* not fcntl */
7#define O_EXCL 0200 /* not fcntl */
8#define O_NOCTTY 0400 /* not fcntl */
9#define O_TRUNC 01000 /* not fcntl */
10#define O_APPEND 02000
11#define O_NONBLOCK 04000
12#define O_NDELAY O_NONBLOCK
13#define O_SYNC 010000
14#define FASYNC 020000 /* fcntl, for BSD compatibility */
15#define O_DIRECT 040000 /* direct disk access hint */
16#define O_LARGEFILE 0100000
17#define O_DIRECTORY 0200000 /* must be a directory */
18#define O_NOFOLLOW 0400000 /* don't follow links */
19#define O_NOATIME 01000000
20
21#define F_GETLK 5 4#define F_GETLK 5
22#define F_SETLK 6 5#define F_SETLK 6
23#define F_SETLKW 7 6#define F_SETLKW 7
diff --git a/include/asm-ia64/fcntl.h b/include/asm-ia64/fcntl.h
index 9f0ec1e4bd50..b95513370808 100644
--- a/include/asm-ia64/fcntl.h
+++ b/include/asm-ia64/fcntl.h
@@ -1,31 +1,10 @@
1#ifndef _ASM_IA64_FCNTL_H 1#ifndef _ASM_IA64_FCNTL_H
2#define _ASM_IA64_FCNTL_H 2#define _ASM_IA64_FCNTL_H
3/* 3/*
4 * Based on <asm-i386/fcntl.h>.
5 *
6 * Modified 1998-2000 4 * Modified 1998-2000
7 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co. 5 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co.
8 */ 6 */
9 7
10/*
11 * open/fcntl - O_SYNC is only implemented on blocks devices and on
12 * files located on an ext2 file system
13 */
14#define O_CREAT 0100 /* not fcntl */
15#define O_EXCL 0200 /* not fcntl */
16#define O_NOCTTY 0400 /* not fcntl */
17#define O_TRUNC 01000 /* not fcntl */
18#define O_APPEND 02000
19#define O_NONBLOCK 04000
20#define O_NDELAY O_NONBLOCK
21#define O_SYNC 010000
22#define FASYNC 020000 /* fcntl, for BSD compatibility */
23#define O_DIRECT 040000 /* direct disk access hint - currently ignored */
24#define O_LARGEFILE 0100000
25#define O_DIRECTORY 0200000 /* must be a directory */
26#define O_NOFOLLOW 0400000 /* don't follow links */
27#define O_NOATIME 01000000
28
29#define F_GETLK 5 8#define F_GETLK 5
30#define F_SETLK 6 9#define F_SETLK 6
31#define F_SETLKW 7 10#define F_SETLKW 7
diff --git a/include/asm-m32r/fcntl.h b/include/asm-m32r/fcntl.h
index 3372bf915547..9e0191c31e3b 100644
--- a/include/asm-m32r/fcntl.h
+++ b/include/asm-m32r/fcntl.h
@@ -5,23 +5,6 @@
5 5
6/* orig : i386 2.4.18 */ 6/* orig : i386 2.4.18 */
7 7
8/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
9 located on an ext2 file system */
10#define O_CREAT 0100 /* not fcntl */
11#define O_EXCL 0200 /* not fcntl */
12#define O_NOCTTY 0400 /* not fcntl */
13#define O_TRUNC 01000 /* not fcntl */
14#define O_APPEND 02000
15#define O_NONBLOCK 04000
16#define O_NDELAY O_NONBLOCK
17#define O_SYNC 010000
18#define FASYNC 020000 /* fcntl, for BSD compatibility */
19#define O_DIRECT 040000 /* direct disk access hint */
20#define O_LARGEFILE 0100000
21#define O_DIRECTORY 0200000 /* must be a directory */
22#define O_NOFOLLOW 0400000 /* don't follow links */
23#define O_NOATIME 01000000
24
25#define F_GETLK 5 8#define F_GETLK 5
26#define F_SETLK 6 9#define F_SETLK 6
27#define F_SETLKW 7 10#define F_SETLKW 7
diff --git a/include/asm-m68k/fcntl.h b/include/asm-m68k/fcntl.h
index 8051f38ecc8d..60a88ce4ba02 100644
--- a/include/asm-m68k/fcntl.h
+++ b/include/asm-m68k/fcntl.h
@@ -1,22 +1,10 @@
1#ifndef _M68K_FCNTL_H 1#ifndef _M68K_FCNTL_H
2#define _M68K_FCNTL_H 2#define _M68K_FCNTL_H
3 3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_CREAT 0100 /* not fcntl */
7#define O_EXCL 0200 /* not fcntl */
8#define O_NOCTTY 0400 /* not fcntl */
9#define O_TRUNC 01000 /* not fcntl */
10#define O_APPEND 02000
11#define O_NONBLOCK 04000
12#define O_NDELAY O_NONBLOCK
13#define O_SYNC 010000
14#define FASYNC 020000 /* fcntl, for BSD compatibility */
15#define O_DIRECTORY 040000 /* must be a directory */ 4#define O_DIRECTORY 040000 /* must be a directory */
16#define O_NOFOLLOW 0100000 /* don't follow links */ 5#define O_NOFOLLOW 0100000 /* don't follow links */
17#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ 6#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
18#define O_LARGEFILE 0400000 7#define O_LARGEFILE 0400000
19#define O_NOATIME 01000000
20 8
21#define F_GETLK 5 9#define F_GETLK 5
22#define F_SETLK 6 10#define F_SETLK 6
diff --git a/include/asm-mips/fcntl.h b/include/asm-mips/fcntl.h
index 4b6043f12806..67b309d34c09 100644
--- a/include/asm-mips/fcntl.h
+++ b/include/asm-mips/fcntl.h
@@ -8,23 +8,15 @@
8#ifndef _ASM_FCNTL_H 8#ifndef _ASM_FCNTL_H
9#define _ASM_FCNTL_H 9#define _ASM_FCNTL_H
10 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_APPEND 0x0008 11#define O_APPEND 0x0008
14#define O_SYNC 0x0010 12#define O_SYNC 0x0010
15#define O_NONBLOCK 0x0080 13#define O_NONBLOCK 0x0080
16#define O_CREAT 0x0100 /* not fcntl */ 14#define O_CREAT 0x0100 /* not fcntl */
17#define O_TRUNC 0x0200 /* not fcntl */
18#define O_EXCL 0x0400 /* not fcntl */ 15#define O_EXCL 0x0400 /* not fcntl */
19#define O_NOCTTY 0x0800 /* not fcntl */ 16#define O_NOCTTY 0x0800 /* not fcntl */
20#define FASYNC 0x1000 /* fcntl, for BSD compatibility */ 17#define FASYNC 0x1000 /* fcntl, for BSD compatibility */
21#define O_LARGEFILE 0x2000 /* allow large file opens */ 18#define O_LARGEFILE 0x2000 /* allow large file opens */
22#define O_DIRECT 0x8000 /* direct disk access hint */ 19#define O_DIRECT 0x8000 /* direct disk access hint */
23#define O_DIRECTORY 0x10000 /* must be a directory */
24#define O_NOFOLLOW 0x20000 /* don't follow links */
25#define O_NOATIME 0x40000
26
27#define O_NDELAY O_NONBLOCK
28 20
29#define F_GETLK 14 21#define F_GETLK 14
30#define F_SETLK 6 22#define F_SETLK 6
diff --git a/include/asm-parisc/fcntl.h b/include/asm-parisc/fcntl.h
index 0a4ee6398735..64664ba33440 100644
--- a/include/asm-parisc/fcntl.h
+++ b/include/asm-parisc/fcntl.h
@@ -6,19 +6,15 @@
6#define O_APPEND 00000010 6#define O_APPEND 00000010
7#define O_BLKSEEK 00000100 /* HPUX only */ 7#define O_BLKSEEK 00000100 /* HPUX only */
8#define O_CREAT 00000400 /* not fcntl */ 8#define O_CREAT 00000400 /* not fcntl */
9#define O_TRUNC 00001000 /* not fcntl */
10#define O_EXCL 00002000 /* not fcntl */ 9#define O_EXCL 00002000 /* not fcntl */
11#define O_LARGEFILE 00004000 10#define O_LARGEFILE 00004000
12#define O_SYNC 00100000 11#define O_SYNC 00100000
13#define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */ 12#define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */
14#define O_NDELAY O_NONBLOCK
15#define O_NOCTTY 00400000 /* not fcntl */ 13#define O_NOCTTY 00400000 /* not fcntl */
16#define O_DSYNC 01000000 /* HPUX only */ 14#define O_DSYNC 01000000 /* HPUX only */
17#define O_RSYNC 02000000 /* HPUX only */ 15#define O_RSYNC 02000000 /* HPUX only */
18#define O_NOATIME 04000000 16#define O_NOATIME 04000000
19 17
20#define FASYNC 00020000 /* fcntl, for BSD compatibility */
21#define O_DIRECT 00040000 /* direct disk access hint - currently ignored */
22#define O_DIRECTORY 00010000 /* must be a directory */ 18#define O_DIRECTORY 00010000 /* must be a directory */
23#define O_NOFOLLOW 00000200 /* don't follow links */ 19#define O_NOFOLLOW 00000200 /* don't follow links */
24#define O_INVISIBLE 04000000 /* invisible I/O, for DMAPI/XDSM */ 20#define O_INVISIBLE 04000000 /* invisible I/O, for DMAPI/XDSM */
diff --git a/include/asm-ppc/fcntl.h b/include/asm-ppc/fcntl.h
index 2f1cfb6f2343..4e0cfdb2001a 100644
--- a/include/asm-ppc/fcntl.h
+++ b/include/asm-ppc/fcntl.h
@@ -1,22 +1,10 @@
1#ifndef _PPC_FCNTL_H 1#ifndef _PPC_FCNTL_H
2#define _PPC_FCNTL_H 2#define _PPC_FCNTL_H
3 3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_CREAT 0100 /* not fcntl */
7#define O_EXCL 0200 /* not fcntl */
8#define O_NOCTTY 0400 /* not fcntl */
9#define O_TRUNC 01000 /* not fcntl */
10#define O_APPEND 02000
11#define O_NONBLOCK 04000
12#define O_NDELAY O_NONBLOCK
13#define O_SYNC 010000
14#define FASYNC 020000 /* fcntl, for BSD compatibility */
15#define O_DIRECTORY 040000 /* must be a directory */ 4#define O_DIRECTORY 040000 /* must be a directory */
16#define O_NOFOLLOW 0100000 /* don't follow links */ 5#define O_NOFOLLOW 0100000 /* don't follow links */
17#define O_LARGEFILE 0200000 6#define O_LARGEFILE 0200000
18#define O_DIRECT 0400000 /* direct disk access hint */ 7#define O_DIRECT 0400000 /* direct disk access hint */
19#define O_NOATIME 01000000
20 8
21#define F_GETLK 5 9#define F_GETLK 5
22#define F_SETLK 6 10#define F_SETLK 6
diff --git a/include/asm-s390/fcntl.h b/include/asm-s390/fcntl.h
index 159979f35097..ea9a75bd6c96 100644
--- a/include/asm-s390/fcntl.h
+++ b/include/asm-s390/fcntl.h
@@ -8,23 +8,6 @@
8#ifndef _S390_FCNTL_H 8#ifndef _S390_FCNTL_H
9#define _S390_FCNTL_H 9#define _S390_FCNTL_H
10 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 11#define F_GETLK 5
29#define F_SETLK 6 12#define F_SETLK 6
30#define F_SETLKW 7 13#define F_SETLKW 7
diff --git a/include/asm-sh/fcntl.h b/include/asm-sh/fcntl.h
index 7c256734cf14..0441ad64f7cb 100644
--- a/include/asm-sh/fcntl.h
+++ b/include/asm-sh/fcntl.h
@@ -1,23 +1,6 @@
1#ifndef __ASM_SH_FCNTL_H 1#ifndef __ASM_SH_FCNTL_H
2#define __ASM_SH_FCNTL_H 2#define __ASM_SH_FCNTL_H
3 3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_CREAT 0100 /* not fcntl */
7#define O_EXCL 0200 /* not fcntl */
8#define O_NOCTTY 0400 /* not fcntl */
9#define O_TRUNC 01000 /* not fcntl */
10#define O_APPEND 02000
11#define O_NONBLOCK 04000
12#define O_NDELAY O_NONBLOCK
13#define O_SYNC 010000
14#define FASYNC 020000 /* fcntl, for BSD compatibility */
15#define O_DIRECT 040000 /* direct disk access hint - currently ignored */
16#define O_LARGEFILE 0100000
17#define O_DIRECTORY 0200000 /* must be a directory */
18#define O_NOFOLLOW 0400000 /* don't follow links */
19#define O_NOATIME 01000000
20
21#define F_GETLK 5 4#define F_GETLK 5
22#define F_SETLK 6 5#define F_SETLK 6
23#define F_SETLKW 7 6#define F_SETLKW 7
diff --git a/include/asm-sparc/fcntl.h b/include/asm-sparc/fcntl.h
index 68d3fd9156fd..1d35c90daec7 100644
--- a/include/asm-sparc/fcntl.h
+++ b/include/asm-sparc/fcntl.h
@@ -13,8 +13,6 @@
13#define O_NONBLOCK 0x4000 13#define O_NONBLOCK 0x4000
14#define O_NDELAY (0x0004 | O_NONBLOCK) 14#define O_NDELAY (0x0004 | O_NONBLOCK)
15#define O_NOCTTY 0x8000 /* not fcntl */ 15#define O_NOCTTY 0x8000 /* not fcntl */
16#define O_DIRECTORY 0x10000 /* must be a directory */
17#define O_NOFOLLOW 0x20000 /* don't follow links */
18#define O_LARGEFILE 0x40000 16#define O_LARGEFILE 0x40000
19#define O_DIRECT 0x100000 /* direct disk access hint */ 17#define O_DIRECT 0x100000 /* direct disk access hint */
20#define O_NOATIME 0x200000 18#define O_NOATIME 0x200000
diff --git a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h
index a8c543d1ebf9..3e82239a7715 100644
--- a/include/asm-sparc64/fcntl.h
+++ b/include/asm-sparc64/fcntl.h
@@ -13,8 +13,6 @@
13#define O_SYNC 0x2000 13#define O_SYNC 0x2000
14#define O_NONBLOCK 0x4000 14#define O_NONBLOCK 0x4000
15#define O_NOCTTY 0x8000 /* not fcntl */ 15#define O_NOCTTY 0x8000 /* not fcntl */
16#define O_DIRECTORY 0x10000 /* must be a directory */
17#define O_NOFOLLOW 0x20000 /* don't follow links */
18#define O_LARGEFILE 0x40000 16#define O_LARGEFILE 0x40000
19#define O_DIRECT 0x100000 /* direct disk access hint */ 17#define O_DIRECT 0x100000 /* direct disk access hint */
20#define O_NOATIME 0x200000 18#define O_NOATIME 0x200000
diff --git a/include/asm-v850/fcntl.h b/include/asm-v850/fcntl.h
index 1a39a0cb9ce5..fff7d57f1757 100644
--- a/include/asm-v850/fcntl.h
+++ b/include/asm-v850/fcntl.h
@@ -1,22 +1,10 @@
1#ifndef __V850_FCNTL_H__ 1#ifndef __V850_FCNTL_H__
2#define __V850_FCNTL_H__ 2#define __V850_FCNTL_H__
3 3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_CREAT 0100 /* not fcntl */
7#define O_EXCL 0200 /* not fcntl */
8#define O_NOCTTY 0400 /* not fcntl */
9#define O_TRUNC 01000 /* not fcntl */
10#define O_APPEND 02000
11#define O_NONBLOCK 04000
12#define O_NDELAY O_NONBLOCK
13#define O_SYNC 010000
14#define FASYNC 020000 /* fcntl, for BSD compatibility */
15#define O_DIRECTORY 040000 /* must be a directory */ 4#define O_DIRECTORY 040000 /* must be a directory */
16#define O_NOFOLLOW 0100000 /* don't follow links */ 5#define O_NOFOLLOW 0100000 /* don't follow links */
17#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ 6#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
18#define O_LARGEFILE 0400000 7#define O_LARGEFILE 0400000
19#define O_NOATIME 01000000
20 8
21#define F_GETLK 5 9#define F_GETLK 5
22#define F_SETLK 6 10#define F_SETLK 6
diff --git a/include/asm-x86_64/fcntl.h b/include/asm-x86_64/fcntl.h
index f58d8d1d9b2f..4e800feddcfa 100644
--- a/include/asm-x86_64/fcntl.h
+++ b/include/asm-x86_64/fcntl.h
@@ -1,23 +1,6 @@
1#ifndef _X86_64_FCNTL_H 1#ifndef _X86_64_FCNTL_H
2#define _X86_64_FCNTL_H 2#define _X86_64_FCNTL_H
3 3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_CREAT 0100 /* not fcntl */
7#define O_EXCL 0200 /* not fcntl */
8#define O_NOCTTY 0400 /* not fcntl */
9#define O_TRUNC 01000 /* not fcntl */
10#define O_APPEND 02000
11#define O_NONBLOCK 04000
12#define O_NDELAY O_NONBLOCK
13#define O_SYNC 010000
14#define FASYNC 020000 /* fcntl, for BSD compatibility */
15#define O_DIRECT 040000 /* direct disk access hint */
16#define O_LARGEFILE 0100000
17#define O_DIRECTORY 0200000 /* must be a directory */
18#define O_NOFOLLOW 0400000 /* don't follow links */
19#define O_NOATIME 01000000
20
21#define F_GETLK 5 4#define F_GETLK 5
22#define F_SETLK 6 5#define F_SETLK 6
23#define F_SETLKW 7 6#define F_SETLKW 7
diff --git a/include/asm-xtensa/fcntl.h b/include/asm-xtensa/fcntl.h
index a5c6e4b6a20e..7724345ee077 100644
--- a/include/asm-xtensa/fcntl.h
+++ b/include/asm-xtensa/fcntl.h
@@ -18,18 +18,13 @@
18#define O_SYNC 0x0010 18#define O_SYNC 0x0010
19#define O_NONBLOCK 0x0080 19#define O_NONBLOCK 0x0080
20#define O_CREAT 0x0100 /* not fcntl */ 20#define O_CREAT 0x0100 /* not fcntl */
21#define O_TRUNC 0x0200 /* not fcntl */
22#define O_EXCL 0x0400 /* not fcntl */ 21#define O_EXCL 0x0400 /* not fcntl */
23#define O_NOCTTY 0x0800 /* not fcntl */ 22#define O_NOCTTY 0x0800 /* not fcntl */
24#define FASYNC 0x1000 /* fcntl, for BSD compatibility */ 23#define FASYNC 0x1000 /* fcntl, for BSD compatibility */
25#define O_LARGEFILE 0x2000 /* allow large file opens - currently ignored */ 24#define O_LARGEFILE 0x2000 /* allow large file opens - currently ignored */
26#define O_DIRECT 0x8000 /* direct disk access hint - currently ignored*/ 25#define O_DIRECT 0x8000 /* direct disk access hint - currently ignored*/
27#define O_DIRECTORY 0x10000 /* must be a directory */
28#define O_NOFOLLOW 0x20000 /* don't follow links */
29#define O_NOATIME 0x100000 26#define O_NOATIME 0x100000
30 27
31#define O_NDELAY O_NONBLOCK
32
33#define F_GETLK 14 28#define F_GETLK 14
34#define F_GETLK64 15 29#define F_GETLK64 15
35#define F_SETLK 6 30#define F_SETLK 6