• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Generated by ./xlat/gen.sh from ./xlat/seccomp_mode.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(SECCOMP_MODE_DISABLED) || (defined(HAVE_DECL_SECCOMP_MODE_DISABLED) && HAVE_DECL_SECCOMP_MODE_DISABLED)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((SECCOMP_MODE_DISABLED) == (0), "SECCOMP_MODE_DISABLED != 0");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define SECCOMP_MODE_DISABLED 0
12 #endif
13 #if defined(SECCOMP_MODE_STRICT) || (defined(HAVE_DECL_SECCOMP_MODE_STRICT) && HAVE_DECL_SECCOMP_MODE_STRICT)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((SECCOMP_MODE_STRICT) == (1), "SECCOMP_MODE_STRICT != 1");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define SECCOMP_MODE_STRICT 1
19 #endif
20 #if defined(SECCOMP_MODE_FILTER) || (defined(HAVE_DECL_SECCOMP_MODE_FILTER) && HAVE_DECL_SECCOMP_MODE_FILTER)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((SECCOMP_MODE_FILTER) == (2), "SECCOMP_MODE_FILTER != 2");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define SECCOMP_MODE_FILTER 2
26 #endif
27 
28 #ifndef XLAT_MACROS_ONLY
29 
30 # ifdef IN_MPERS
31 
32 #  error static const struct xlat seccomp_mode in mpers mode
33 
34 # else
35 
36 static
37 const struct xlat seccomp_mode[] = {
38  XLAT(SECCOMP_MODE_DISABLED),
39  XLAT(SECCOMP_MODE_STRICT),
40  XLAT(SECCOMP_MODE_FILTER),
41  XLAT_END
42 };
43 
44 # endif /* !IN_MPERS */
45 
46 #endif /* !XLAT_MACROS_ONLY */
47