1 /* Generated by ./xlat/gen.sh from ./xlat/key_perms.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined(KEY_POS_VIEW) || (defined(HAVE_DECL_KEY_POS_VIEW) && HAVE_DECL_KEY_POS_VIEW) 7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8 static_assert((KEY_POS_VIEW) == (0x01000000), "KEY_POS_VIEW != 0x01000000"); 9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10 #else 11 # define KEY_POS_VIEW 0x01000000 12 #endif 13 #if defined(KEY_POS_READ) || (defined(HAVE_DECL_KEY_POS_READ) && HAVE_DECL_KEY_POS_READ) 14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15 static_assert((KEY_POS_READ) == (0x02000000), "KEY_POS_READ != 0x02000000"); 16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17 #else 18 # define KEY_POS_READ 0x02000000 19 #endif 20 #if defined(KEY_POS_WRITE) || (defined(HAVE_DECL_KEY_POS_WRITE) && HAVE_DECL_KEY_POS_WRITE) 21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22 static_assert((KEY_POS_WRITE) == (0x04000000), "KEY_POS_WRITE != 0x04000000"); 23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24 #else 25 # define KEY_POS_WRITE 0x04000000 26 #endif 27 #if defined(KEY_POS_SEARCH) || (defined(HAVE_DECL_KEY_POS_SEARCH) && HAVE_DECL_KEY_POS_SEARCH) 28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 29 static_assert((KEY_POS_SEARCH) == (0x08000000), "KEY_POS_SEARCH != 0x08000000"); 30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 31 #else 32 # define KEY_POS_SEARCH 0x08000000 33 #endif 34 #if defined(KEY_POS_LINK) || (defined(HAVE_DECL_KEY_POS_LINK) && HAVE_DECL_KEY_POS_LINK) 35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 36 static_assert((KEY_POS_LINK) == (0x10000000), "KEY_POS_LINK != 0x10000000"); 37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 38 #else 39 # define KEY_POS_LINK 0x10000000 40 #endif 41 #if defined(KEY_POS_SETATTR) || (defined(HAVE_DECL_KEY_POS_SETATTR) && HAVE_DECL_KEY_POS_SETATTR) 42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 43 static_assert((KEY_POS_SETATTR) == (0x20000000), "KEY_POS_SETATTR != 0x20000000"); 44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 45 #else 46 # define KEY_POS_SETATTR 0x20000000 47 #endif 48 #if defined(KEY_POS_ALL) || (defined(HAVE_DECL_KEY_POS_ALL) && HAVE_DECL_KEY_POS_ALL) 49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 50 static_assert((KEY_POS_ALL) == (0x3f000000), "KEY_POS_ALL != 0x3f000000"); 51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 52 #else 53 # define KEY_POS_ALL 0x3f000000 54 #endif 55 #if defined(KEY_USR_VIEW) || (defined(HAVE_DECL_KEY_USR_VIEW) && HAVE_DECL_KEY_USR_VIEW) 56 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 57 static_assert((KEY_USR_VIEW) == (0x00010000), "KEY_USR_VIEW != 0x00010000"); 58 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 59 #else 60 # define KEY_USR_VIEW 0x00010000 61 #endif 62 #if defined(KEY_USR_READ) || (defined(HAVE_DECL_KEY_USR_READ) && HAVE_DECL_KEY_USR_READ) 63 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 64 static_assert((KEY_USR_READ) == (0x00020000), "KEY_USR_READ != 0x00020000"); 65 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 66 #else 67 # define KEY_USR_READ 0x00020000 68 #endif 69 #if defined(KEY_USR_WRITE) || (defined(HAVE_DECL_KEY_USR_WRITE) && HAVE_DECL_KEY_USR_WRITE) 70 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 71 static_assert((KEY_USR_WRITE) == (0x00040000), "KEY_USR_WRITE != 0x00040000"); 72 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 73 #else 74 # define KEY_USR_WRITE 0x00040000 75 #endif 76 #if defined(KEY_USR_SEARCH) || (defined(HAVE_DECL_KEY_USR_SEARCH) && HAVE_DECL_KEY_USR_SEARCH) 77 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 78 static_assert((KEY_USR_SEARCH) == (0x00080000), "KEY_USR_SEARCH != 0x00080000"); 79 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 80 #else 81 # define KEY_USR_SEARCH 0x00080000 82 #endif 83 #if defined(KEY_USR_LINK) || (defined(HAVE_DECL_KEY_USR_LINK) && HAVE_DECL_KEY_USR_LINK) 84 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 85 static_assert((KEY_USR_LINK) == (0x00100000), "KEY_USR_LINK != 0x00100000"); 86 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 87 #else 88 # define KEY_USR_LINK 0x00100000 89 #endif 90 #if defined(KEY_USR_SETATTR) || (defined(HAVE_DECL_KEY_USR_SETATTR) && HAVE_DECL_KEY_USR_SETATTR) 91 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 92 static_assert((KEY_USR_SETATTR) == (0x00200000), "KEY_USR_SETATTR != 0x00200000"); 93 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 94 #else 95 # define KEY_USR_SETATTR 0x00200000 96 #endif 97 #if defined(KEY_USR_ALL) || (defined(HAVE_DECL_KEY_USR_ALL) && HAVE_DECL_KEY_USR_ALL) 98 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 99 static_assert((KEY_USR_ALL) == (0x003f0000), "KEY_USR_ALL != 0x003f0000"); 100 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 101 #else 102 # define KEY_USR_ALL 0x003f0000 103 #endif 104 #if defined(KEY_GRP_VIEW) || (defined(HAVE_DECL_KEY_GRP_VIEW) && HAVE_DECL_KEY_GRP_VIEW) 105 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 106 static_assert((KEY_GRP_VIEW) == (0x00000100), "KEY_GRP_VIEW != 0x00000100"); 107 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 108 #else 109 # define KEY_GRP_VIEW 0x00000100 110 #endif 111 #if defined(KEY_GRP_READ) || (defined(HAVE_DECL_KEY_GRP_READ) && HAVE_DECL_KEY_GRP_READ) 112 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 113 static_assert((KEY_GRP_READ) == (0x00000200), "KEY_GRP_READ != 0x00000200"); 114 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 115 #else 116 # define KEY_GRP_READ 0x00000200 117 #endif 118 #if defined(KEY_GRP_WRITE) || (defined(HAVE_DECL_KEY_GRP_WRITE) && HAVE_DECL_KEY_GRP_WRITE) 119 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 120 static_assert((KEY_GRP_WRITE) == (0x00000400), "KEY_GRP_WRITE != 0x00000400"); 121 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 122 #else 123 # define KEY_GRP_WRITE 0x00000400 124 #endif 125 #if defined(KEY_GRP_SEARCH) || (defined(HAVE_DECL_KEY_GRP_SEARCH) && HAVE_DECL_KEY_GRP_SEARCH) 126 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 127 static_assert((KEY_GRP_SEARCH) == (0x00000800), "KEY_GRP_SEARCH != 0x00000800"); 128 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 129 #else 130 # define KEY_GRP_SEARCH 0x00000800 131 #endif 132 #if defined(KEY_GRP_LINK) || (defined(HAVE_DECL_KEY_GRP_LINK) && HAVE_DECL_KEY_GRP_LINK) 133 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 134 static_assert((KEY_GRP_LINK) == (0x00001000), "KEY_GRP_LINK != 0x00001000"); 135 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 136 #else 137 # define KEY_GRP_LINK 0x00001000 138 #endif 139 #if defined(KEY_GRP_SETATTR) || (defined(HAVE_DECL_KEY_GRP_SETATTR) && HAVE_DECL_KEY_GRP_SETATTR) 140 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 141 static_assert((KEY_GRP_SETATTR) == (0x00002000), "KEY_GRP_SETATTR != 0x00002000"); 142 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 143 #else 144 # define KEY_GRP_SETATTR 0x00002000 145 #endif 146 #if defined(KEY_GRP_ALL) || (defined(HAVE_DECL_KEY_GRP_ALL) && HAVE_DECL_KEY_GRP_ALL) 147 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 148 static_assert((KEY_GRP_ALL) == (0x00003f00), "KEY_GRP_ALL != 0x00003f00"); 149 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 150 #else 151 # define KEY_GRP_ALL 0x00003f00 152 #endif 153 #if defined(KEY_OTH_VIEW) || (defined(HAVE_DECL_KEY_OTH_VIEW) && HAVE_DECL_KEY_OTH_VIEW) 154 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 155 static_assert((KEY_OTH_VIEW) == (0x00000001), "KEY_OTH_VIEW != 0x00000001"); 156 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 157 #else 158 # define KEY_OTH_VIEW 0x00000001 159 #endif 160 #if defined(KEY_OTH_READ) || (defined(HAVE_DECL_KEY_OTH_READ) && HAVE_DECL_KEY_OTH_READ) 161 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 162 static_assert((KEY_OTH_READ) == (0x00000002), "KEY_OTH_READ != 0x00000002"); 163 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 164 #else 165 # define KEY_OTH_READ 0x00000002 166 #endif 167 #if defined(KEY_OTH_WRITE) || (defined(HAVE_DECL_KEY_OTH_WRITE) && HAVE_DECL_KEY_OTH_WRITE) 168 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 169 static_assert((KEY_OTH_WRITE) == (0x00000004), "KEY_OTH_WRITE != 0x00000004"); 170 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 171 #else 172 # define KEY_OTH_WRITE 0x00000004 173 #endif 174 #if defined(KEY_OTH_SEARCH) || (defined(HAVE_DECL_KEY_OTH_SEARCH) && HAVE_DECL_KEY_OTH_SEARCH) 175 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 176 static_assert((KEY_OTH_SEARCH) == (0x00000008), "KEY_OTH_SEARCH != 0x00000008"); 177 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 178 #else 179 # define KEY_OTH_SEARCH 0x00000008 180 #endif 181 #if defined(KEY_OTH_LINK) || (defined(HAVE_DECL_KEY_OTH_LINK) && HAVE_DECL_KEY_OTH_LINK) 182 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 183 static_assert((KEY_OTH_LINK) == (0x00000010), "KEY_OTH_LINK != 0x00000010"); 184 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 185 #else 186 # define KEY_OTH_LINK 0x00000010 187 #endif 188 #if defined(KEY_OTH_SETATTR) || (defined(HAVE_DECL_KEY_OTH_SETATTR) && HAVE_DECL_KEY_OTH_SETATTR) 189 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 190 static_assert((KEY_OTH_SETATTR) == (0x00000020), "KEY_OTH_SETATTR != 0x00000020"); 191 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 192 #else 193 # define KEY_OTH_SETATTR 0x00000020 194 #endif 195 #if defined(KEY_OTH_ALL) || (defined(HAVE_DECL_KEY_OTH_ALL) && HAVE_DECL_KEY_OTH_ALL) 196 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 197 static_assert((KEY_OTH_ALL) == (0x0000003f), "KEY_OTH_ALL != 0x0000003f"); 198 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 199 #else 200 # define KEY_OTH_ALL 0x0000003f 201 #endif 202 203 #ifndef XLAT_MACROS_ONLY 204 205 # ifdef IN_MPERS 206 207 # error static const struct xlat key_perms in mpers mode 208 209 # else 210 211 static 212 const struct xlat key_perms[] = { 213 XLAT(KEY_POS_VIEW), 214 XLAT(KEY_POS_READ), 215 XLAT(KEY_POS_WRITE), 216 XLAT(KEY_POS_SEARCH), 217 XLAT(KEY_POS_LINK), 218 XLAT(KEY_POS_SETATTR), 219 XLAT(KEY_POS_ALL), 220 XLAT(KEY_USR_VIEW), 221 XLAT(KEY_USR_READ), 222 XLAT(KEY_USR_WRITE), 223 XLAT(KEY_USR_SEARCH), 224 XLAT(KEY_USR_LINK), 225 XLAT(KEY_USR_SETATTR), 226 XLAT(KEY_USR_ALL), 227 XLAT(KEY_GRP_VIEW), 228 XLAT(KEY_GRP_READ), 229 XLAT(KEY_GRP_WRITE), 230 XLAT(KEY_GRP_SEARCH), 231 XLAT(KEY_GRP_LINK), 232 XLAT(KEY_GRP_SETATTR), 233 XLAT(KEY_GRP_ALL), 234 XLAT(KEY_OTH_VIEW), 235 XLAT(KEY_OTH_READ), 236 XLAT(KEY_OTH_WRITE), 237 XLAT(KEY_OTH_SEARCH), 238 XLAT(KEY_OTH_LINK), 239 XLAT(KEY_OTH_SETATTR), 240 XLAT(KEY_OTH_ALL), 241 XLAT_END 242 }; 243 244 # endif /* !IN_MPERS */ 245 246 #endif /* !XLAT_MACROS_ONLY */ 247