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

TOMOYO Linux Cross Reference
Linux/include/trace/misc/fs.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ 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 /*
  3  * Display helpers for generic filesystem items
  4  *
  5  * Author: Chuck Lever <chuck.lever@oracle.com>
  6  *
  7  * Copyright (c) 2020, Oracle and/or its affiliates.
  8  */
  9 
 10 #include <linux/fs.h>
 11 
 12 #define show_fs_dirent_type(x) \
 13         __print_symbolic(x, \
 14                 { DT_UNKNOWN,           "UNKNOWN" }, \
 15                 { DT_FIFO,              "FIFO" }, \
 16                 { DT_CHR,               "CHR" }, \
 17                 { DT_DIR,               "DIR" }, \
 18                 { DT_BLK,               "BLK" }, \
 19                 { DT_REG,               "REG" }, \
 20                 { DT_LNK,               "LNK" }, \
 21                 { DT_SOCK,              "SOCK" }, \
 22                 { DT_WHT,               "WHT" })
 23 
 24 #define show_fs_fcntl_open_flags(x) \
 25         __print_flags(x, "|", \
 26                 { O_WRONLY,             "O_WRONLY" }, \
 27                 { O_RDWR,               "O_RDWR" }, \
 28                 { O_CREAT,              "O_CREAT" }, \
 29                 { O_EXCL,               "O_EXCL" }, \
 30                 { O_NOCTTY,             "O_NOCTTY" }, \
 31                 { O_TRUNC,              "O_TRUNC" }, \
 32                 { O_APPEND,             "O_APPEND" }, \
 33                 { O_NONBLOCK,           "O_NONBLOCK" }, \
 34                 { O_DSYNC,              "O_DSYNC" }, \
 35                 { O_DIRECT,             "O_DIRECT" }, \
 36                 { O_LARGEFILE,          "O_LARGEFILE" }, \
 37                 { O_DIRECTORY,          "O_DIRECTORY" }, \
 38                 { O_NOFOLLOW,           "O_NOFOLLOW" }, \
 39                 { O_NOATIME,            "O_NOATIME" }, \
 40                 { O_CLOEXEC,            "O_CLOEXEC" })
 41 
 42 #define __fmode_flag(x) { (__force unsigned long)FMODE_##x, #x }
 43 #define show_fs_fmode_flags(x) \
 44         __print_flags(x, "|", \
 45                 __fmode_flag(READ), \
 46                 __fmode_flag(WRITE), \
 47                 __fmode_flag(EXEC))
 48 
 49 #ifdef CONFIG_64BIT
 50 #define show_fs_fcntl_cmd(x) \
 51         __print_symbolic(x, \
 52                 { F_DUPFD,              "DUPFD" }, \
 53                 { F_GETFD,              "GETFD" }, \
 54                 { F_SETFD,              "SETFD" }, \
 55                 { F_GETFL,              "GETFL" }, \
 56                 { F_SETFL,              "SETFL" }, \
 57                 { F_GETLK,              "GETLK" }, \
 58                 { F_SETLK,              "SETLK" }, \
 59                 { F_SETLKW,             "SETLKW" }, \
 60                 { F_SETOWN,             "SETOWN" }, \
 61                 { F_GETOWN,             "GETOWN" }, \
 62                 { F_SETSIG,             "SETSIG" }, \
 63                 { F_GETSIG,             "GETSIG" }, \
 64                 { F_SETOWN_EX,          "SETOWN_EX" }, \
 65                 { F_GETOWN_EX,          "GETOWN_EX" }, \
 66                 { F_GETOWNER_UIDS,      "GETOWNER_UIDS" }, \
 67                 { F_OFD_GETLK,          "OFD_GETLK" }, \
 68                 { F_OFD_SETLK,          "OFD_SETLK" }, \
 69                 { F_OFD_SETLKW,         "OFD_SETLKW" })
 70 #else /* CONFIG_64BIT */
 71 #define show_fs_fcntl_cmd(x) \
 72         __print_symbolic(x, \
 73                 { F_DUPFD,              "DUPFD" }, \
 74                 { F_GETFD,              "GETFD" }, \
 75                 { F_SETFD,              "SETFD" }, \
 76                 { F_GETFL,              "GETFL" }, \
 77                 { F_SETFL,              "SETFL" }, \
 78                 { F_GETLK,              "GETLK" }, \
 79                 { F_SETLK,              "SETLK" }, \
 80                 { F_SETLKW,             "SETLKW" }, \
 81                 { F_SETOWN,             "SETOWN" }, \
 82                 { F_GETOWN,             "GETOWN" }, \
 83                 { F_SETSIG,             "SETSIG" }, \
 84                 { F_GETSIG,             "GETSIG" }, \
 85                 { F_GETLK64,            "GETLK64" }, \
 86                 { F_SETLK64,            "SETLK64" }, \
 87                 { F_SETLKW64,           "SETLKW64" }, \
 88                 { F_SETOWN_EX,          "SETOWN_EX" }, \
 89                 { F_GETOWN_EX,          "GETOWN_EX" }, \
 90                 { F_GETOWNER_UIDS,      "GETOWNER_UIDS" }, \
 91                 { F_OFD_GETLK,          "OFD_GETLK" }, \
 92                 { F_OFD_SETLK,          "OFD_SETLK" }, \
 93                 { F_OFD_SETLKW,         "OFD_SETLKW" })
 94 #endif /* CONFIG_64BIT */
 95 
 96 #define show_fs_fcntl_lock_type(x) \
 97         __print_symbolic(x, \
 98                 { F_RDLCK,              "RDLCK" }, \
 99                 { F_WRLCK,              "WRLCK" }, \
100                 { F_UNLCK,              "UNLCK" })
101 
102 #define show_fs_lookup_flags(flags) \
103         __print_flags(flags, "|", \
104                 { LOOKUP_FOLLOW,        "FOLLOW" }, \
105                 { LOOKUP_DIRECTORY,     "DIRECTORY" }, \
106                 { LOOKUP_AUTOMOUNT,     "AUTOMOUNT" }, \
107                 { LOOKUP_EMPTY,         "EMPTY" }, \
108                 { LOOKUP_DOWN,          "DOWN" }, \
109                 { LOOKUP_MOUNTPOINT,    "MOUNTPOINT" }, \
110                 { LOOKUP_REVAL,         "REVAL" }, \
111                 { LOOKUP_RCU,           "RCU" }, \
112                 { LOOKUP_OPEN,          "OPEN" }, \
113                 { LOOKUP_CREATE,        "CREATE" }, \
114                 { LOOKUP_EXCL,          "EXCL" }, \
115                 { LOOKUP_RENAME_TARGET, "RENAME_TARGET" }, \
116                 { LOOKUP_PARENT,        "PARENT" }, \
117                 { LOOKUP_NO_SYMLINKS,   "NO_SYMLINKS" }, \
118                 { LOOKUP_NO_MAGICLINKS, "NO_MAGICLINKS" }, \
119                 { LOOKUP_NO_XDEV,       "NO_XDEV" }, \
120                 { LOOKUP_BENEATH,       "BENEATH" }, \
121                 { LOOKUP_IN_ROOT,       "IN_ROOT" }, \
122                 { LOOKUP_CACHED,        "CACHED" })
123 

~ [ 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