~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/fcntl.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _LINUX_FCNTL_H
  3 #define _LINUX_FCNTL_H
  4 
  5 #include <linux/stat.h>
  6 #include <uapi/linux/fcntl.h>
  7 
  8 /* List of all valid flags for the open/openat flags argument: */
  9 #define VALID_OPEN_FLAGS \
 10         (O_RDONLY | O_WRONLY | O_RDWR | O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC | \
 11          O_APPEND | O_NDELAY | O_NONBLOCK | __O_SYNC | O_DSYNC | \
 12          FASYNC | O_DIRECT | O_LARGEFILE | O_DIRECTORY | O_NOFOLLOW | \
 13          O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE)
 14 
 15 /* List of all valid flags for the how->resolve argument: */
 16 #define VALID_RESOLVE_FLAGS \
 17         (RESOLVE_NO_XDEV | RESOLVE_NO_MAGICLINKS | RESOLVE_NO_SYMLINKS | \
 18          RESOLVE_BENEATH | RESOLVE_IN_ROOT | RESOLVE_CACHED)
 19 
 20 /* List of all open_how "versions". */
 21 #define OPEN_HOW_SIZE_VER0      24 /* sizeof first published struct */
 22 #define OPEN_HOW_SIZE_LATEST    OPEN_HOW_SIZE_VER0
 23 
 24 #ifndef force_o_largefile
 25 #define force_o_largefile() (!IS_ENABLED(CONFIG_ARCH_32BIT_OFF_T))
 26 #endif
 27 
 28 #if BITS_PER_LONG == 32
 29 #define IS_GETLK32(cmd)         ((cmd) == F_GETLK)
 30 #define IS_SETLK32(cmd)         ((cmd) == F_SETLK)
 31 #define IS_SETLKW32(cmd)        ((cmd) == F_SETLKW)
 32 #define IS_GETLK64(cmd)         ((cmd) == F_GETLK64)
 33 #define IS_SETLK64(cmd)         ((cmd) == F_SETLK64)
 34 #define IS_SETLKW64(cmd)        ((cmd) == F_SETLKW64)
 35 #else
 36 #define IS_GETLK32(cmd)         (0)
 37 #define IS_SETLK32(cmd)         (0)
 38 #define IS_SETLKW32(cmd)        (0)
 39 #define IS_GETLK64(cmd)         ((cmd) == F_GETLK)
 40 #define IS_SETLK64(cmd)         ((cmd) == F_SETLK)
 41 #define IS_SETLKW64(cmd)        ((cmd) == F_SETLKW)
 42 #endif /* BITS_PER_LONG == 32 */
 43 
 44 #define IS_GETLK(cmd)   (IS_GETLK32(cmd)  || IS_GETLK64(cmd))
 45 #define IS_SETLK(cmd)   (IS_SETLK32(cmd)  || IS_SETLK64(cmd))
 46 #define IS_SETLKW(cmd)  (IS_SETLKW32(cmd) || IS_SETLKW64(cmd))
 47 
 48 #endif
 49 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php