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