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