lkml.org 
[lkml]   [2009]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 07/96] documnt FMODE_ constants
2.6.27-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Christoph Hellwig <hch@lst.de>

commit fc9161e54d0dbf799beff9692ea1cc6237162b85 upstream.

Make sure all FMODE_ constants are documents, and ensure a coherent
style for the already existing comments.

[This is needed for the next patch in the .27 kernel which
changes fs.h. This patch makes it easier to handle. - gkh]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
include/linux/fs.h | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -63,18 +63,17 @@ extern int dir_notify_enable;
#define MAY_ACCESS 16
#define MAY_OPEN 32

-#define FMODE_READ 1
-#define FMODE_WRITE 2
-
-/* Internal kernel extensions */
-#define FMODE_LSEEK 4
-#define FMODE_PREAD 8
-#define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */
-
-/* File is being opened for execution. Primary users of this flag are
- distributed filesystems that can use it to achieve correct ETXTBUSY
- behavior for cross-node execution/opening_for_writing of files */
-#define FMODE_EXEC 16
+/* file is open for reading */
+#define FMODE_READ (1)
+/* file is open for writing */
+#define FMODE_WRITE (2)
+/* file is seekable */
+#define FMODE_LSEEK (4)
+/* file can be accessed using pread/pwrite */
+#define FMODE_PREAD (8)
+#define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */
+/* File is opened for execution with sys_execve / sys_uselib */
+#define FMODE_EXEC (16)

#define RW_MASK 1
#define RWA_MASK 2



\
 
 \ /
  Last update: 2009-03-14 01:25    [from the cache]
©2003-2011 Jasper Spaans