diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-09-06 18:17:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 19:57:38 -0400 |
commit | 1abf62afb6e9cdc1b2618b69067a186b94281587 (patch) | |
tree | a3e3266a23d8d75bf6c302763327b60b7372a41c /include/asm-generic | |
parent | e64ca97fd80a129e538ca42d0b12c379746b83db (diff) |
[PATCH] Clean up the fcntl operations
This patch puts the most popular of each fcntl operation/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/asm-generic')
-rw-r--r-- | include/asm-generic/fcntl.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h index f3690e73a40f..1e66f923a252 100644 --- a/include/asm-generic/fcntl.h +++ b/include/asm-generic/fcntl.h | |||
@@ -55,10 +55,41 @@ | |||
55 | #define F_SETFD 2 /* set/clear close_on_exec */ | 55 | #define F_SETFD 2 /* set/clear close_on_exec */ |
56 | #define F_GETFL 3 /* get file->f_flags */ | 56 | #define F_GETFL 3 /* get file->f_flags */ |
57 | #define F_SETFL 4 /* set file->f_flags */ | 57 | #define F_SETFL 4 /* set file->f_flags */ |
58 | #ifndef F_GETLK | ||
59 | #define F_GETLK 5 | ||
60 | #define F_SETLK 6 | ||
61 | #define F_SETLKW 7 | ||
62 | #endif | ||
63 | #ifndef F_SETOWN | ||
64 | #define F_SETOWN 8 /* for sockets. */ | ||
65 | #define F_GETOWN 9 /* for sockets. */ | ||
66 | #endif | ||
67 | #ifndef F_SETSIG | ||
68 | #define F_SETSIG 10 /* for sockets. */ | ||
69 | #define F_GETSIG 11 /* for sockets. */ | ||
70 | #endif | ||
58 | 71 | ||
59 | /* for F_[GET|SET]FL */ | 72 | /* for F_[GET|SET]FL */ |
60 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | 73 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ |
61 | 74 | ||
75 | /* for posix fcntl() and lockf() */ | ||
76 | #ifndef F_RDLCK | ||
77 | #define F_RDLCK 0 | ||
78 | #define F_WRLCK 1 | ||
79 | #define F_UNLCK 2 | ||
80 | #endif | ||
81 | |||
82 | /* for old implementation of bsd flock () */ | ||
83 | #ifndef F_EXLCK | ||
84 | #define F_EXLCK 4 /* or 3 */ | ||
85 | #define F_SHLCK 8 /* or 4 */ | ||
86 | #endif | ||
87 | |||
88 | /* for leases */ | ||
89 | #ifndef F_INPROGRESS | ||
90 | #define F_INPROGRESS 16 | ||
91 | #endif | ||
92 | |||
62 | /* operations for bsd flock(), also used by the kernel implementation */ | 93 | /* operations for bsd flock(), also used by the kernel implementation */ |
63 | #define LOCK_SH 1 /* shared lock */ | 94 | #define LOCK_SH 1 /* shared lock */ |
64 | #define LOCK_EX 2 /* exclusive lock */ | 95 | #define LOCK_EX 2 /* exclusive lock */ |