aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-11-05 08:58:46 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-12-04 04:22:58 -0500
commitfc9161e54d0dbf799beff9692ea1cc6237162b85 (patch)
tree07c08b1bd60cb3b8188aa3470fdf86612019c8ce /include/linux
parentfd4ce1acd0f8558033b1a6968001552bd7671e6d (diff)
[PATCH 2/2] documnt FMODE_ constants
Make sure all FMODE_ constants are documents, and ensure a coherent style for the already existing comments. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index b3345a90e11a..4a853ef6fd35 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -63,21 +63,23 @@ extern int dir_notify_enable;
63#define MAY_ACCESS 16 63#define MAY_ACCESS 16
64#define MAY_OPEN 32 64#define MAY_OPEN 32
65 65
66#define FMODE_READ ((__force fmode_t)1) 66/* file is open for reading */
67#define FMODE_WRITE ((__force fmode_t)2) 67#define FMODE_READ ((__force fmode_t)1)
68 68/* file is open for writing */
69/* Internal kernel extensions */ 69#define FMODE_WRITE ((__force fmode_t)2)
70#define FMODE_LSEEK ((__force fmode_t)4) 70/* file is seekable */
71#define FMODE_PREAD ((__force fmode_t)8) 71#define FMODE_LSEEK ((__force fmode_t)4)
72#define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */ 72/* file can be accessed using pread/pwrite */
73 73#define FMODE_PREAD ((__force fmode_t)8)
74/* File is being opened for execution. Primary users of this flag are 74#define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */
75 distributed filesystems that can use it to achieve correct ETXTBUSY 75/* File is opened for execution with sys_execve / sys_uselib */
76 behavior for cross-node execution/opening_for_writing of files */ 76#define FMODE_EXEC ((__force fmode_t)16)
77#define FMODE_EXEC ((__force fmode_t)16) 77/* File is opened with O_NDELAY (only set for block devices) */
78 78#define FMODE_NDELAY ((__force fmode_t)32)
79#define FMODE_NDELAY ((__force fmode_t)32) 79/* File is opened with O_EXCL (only set for block devices) */
80#define FMODE_EXCL ((__force fmode_t)64) 80#define FMODE_EXCL ((__force fmode_t)64)
81/* File is opened using open(.., 3, ..) and is writeable only for ioctls
82 (specialy hack for floppy.c) */
81#define FMODE_WRITE_IOCTL ((__force fmode_t)128) 83#define FMODE_WRITE_IOCTL ((__force fmode_t)128)
82 84
83#define RW_MASK 1 85#define RW_MASK 1