diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 32 |
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 |