Blame view

include/linux/fcntl.h 2.42 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
  #ifndef _LINUX_FCNTL_H
  #define _LINUX_FCNTL_H
  
  #include <asm/fcntl.h>
22d2b35b2   Ulrich Drepper   F_DUPFD_CLOEXEC i...
5
6
  #define F_SETLEASE	(F_LINUX_SPECIFIC_BASE + 0)
  #define F_GETLEASE	(F_LINUX_SPECIFIC_BASE + 1)
9b9d2ab41   Marc Eshel   locks: add lock c...
7

22d2b35b2   Ulrich Drepper   F_DUPFD_CLOEXEC i...
8
9
10
11
12
13
14
15
  /*
   * Cancel a blocking posix lock; internal use only until we expose an
   * asynchronous lock api to userspace:
   */
  #define F_CANCELLK	(F_LINUX_SPECIFIC_BASE + 5)
  
  /* Create a file descriptor with FD_CLOEXEC set. */
  #define F_DUPFD_CLOEXEC	(F_LINUX_SPECIFIC_BASE + 6)
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
16
17
18
19
20
21
22
23
  
  /*
   * Request nofications on a directory.
   * See below for events that may be notified.
   */
  #define F_NOTIFY	(F_LINUX_SPECIFIC_BASE+2)
  
  /*
35f3d14db   Jens Axboe   pipe: add support...
24
25
26
27
28
29
   * Set and get of pipe page size array
   */
  #define F_SETPIPE_SZ	(F_LINUX_SPECIFIC_BASE + 7)
  #define F_GETPIPE_SZ	(F_LINUX_SPECIFIC_BASE + 8)
  
  /*
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
30
31
32
33
34
35
36
37
38
   * Types of directory notifications that may be requested.
   */
  #define DN_ACCESS	0x00000001	/* File accessed */
  #define DN_MODIFY	0x00000002	/* File modified */
  #define DN_CREATE	0x00000004	/* File created */
  #define DN_DELETE	0x00000008	/* File removed */
  #define DN_RENAME	0x00000010	/* File renamed */
  #define DN_ATTRIB	0x00000020	/* File changed attibutes */
  #define DN_MULTISHOT	0x80000000	/* Don't remove notifier */
5590ff0d5   Ulrich Drepper   [PATCH] vfs: *at ...
39
40
41
42
43
44
  #define AT_FDCWD		-100    /* Special value used to indicate
                                             openat should use the current
                                             working directory. */
  #define AT_SYMLINK_NOFOLLOW	0x100   /* Do not follow symbolic links.  */
  #define AT_REMOVEDIR		0x200   /* Remove directory instead of
                                             unlinking file.  */
45c9b11a1   Ulrich Drepper   [PATCH] Implement...
45
  #define AT_SYMLINK_FOLLOW	0x400   /* Follow symbolic links.  */
5590ff0d5   Ulrich Drepper   [PATCH] vfs: *at ...
46

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
47
  #ifdef __KERNEL__
ef3daeda7   Yoav Zach   [PATCH] Don't for...
48
49
50
  #ifndef force_o_largefile
  #define force_o_largefile() (BITS_PER_LONG != 32)
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
  #if BITS_PER_LONG == 32
  #define IS_GETLK32(cmd)		((cmd) == F_GETLK)
  #define IS_SETLK32(cmd)		((cmd) == F_SETLK)
  #define IS_SETLKW32(cmd)	((cmd) == F_SETLKW)
  #define IS_GETLK64(cmd)		((cmd) == F_GETLK64)
  #define IS_SETLK64(cmd)		((cmd) == F_SETLK64)
  #define IS_SETLKW64(cmd)	((cmd) == F_SETLKW64)
  #else
  #define IS_GETLK32(cmd)		(0)
  #define IS_SETLK32(cmd)		(0)
  #define IS_SETLKW32(cmd)	(0)
  #define IS_GETLK64(cmd)		((cmd) == F_GETLK)
  #define IS_SETLK64(cmd)		((cmd) == F_SETLK)
  #define IS_SETLKW64(cmd)	((cmd) == F_SETLKW)
  #endif /* BITS_PER_LONG == 32 */
  
  #define IS_GETLK(cmd)	(IS_GETLK32(cmd)  || IS_GETLK64(cmd))
  #define IS_SETLK(cmd)	(IS_SETLK32(cmd)  || IS_SETLK64(cmd))
  #define IS_SETLKW(cmd)	(IS_SETLKW32(cmd) || IS_SETLKW64(cmd))
  
  #endif /* __KERNEL__ */
  
  #endif