1 /* Generated by ./xlat/gen.sh from ./xlat/falloc_flags.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined(FALLOC_FL_KEEP_SIZE) || (defined(HAVE_DECL_FALLOC_FL_KEEP_SIZE) && HAVE_DECL_FALLOC_FL_KEEP_SIZE) 7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8 static_assert((FALLOC_FL_KEEP_SIZE) == (0x01), "FALLOC_FL_KEEP_SIZE != 0x01"); 9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10 #else 11 # define FALLOC_FL_KEEP_SIZE 0x01 12 #endif 13 #if defined(FALLOC_FL_PUNCH_HOLE) || (defined(HAVE_DECL_FALLOC_FL_PUNCH_HOLE) && HAVE_DECL_FALLOC_FL_PUNCH_HOLE) 14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15 static_assert((FALLOC_FL_PUNCH_HOLE) == (0x02), "FALLOC_FL_PUNCH_HOLE != 0x02"); 16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17 #else 18 # define FALLOC_FL_PUNCH_HOLE 0x02 19 #endif 20 #if defined(FALLOC_FL_NO_HIDE_STALE) || (defined(HAVE_DECL_FALLOC_FL_NO_HIDE_STALE) && HAVE_DECL_FALLOC_FL_NO_HIDE_STALE) 21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22 static_assert((FALLOC_FL_NO_HIDE_STALE) == (0x04), "FALLOC_FL_NO_HIDE_STALE != 0x04"); 23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24 #else 25 # define FALLOC_FL_NO_HIDE_STALE 0x04 26 #endif 27 #if defined(FALLOC_FL_COLLAPSE_RANGE) || (defined(HAVE_DECL_FALLOC_FL_COLLAPSE_RANGE) && HAVE_DECL_FALLOC_FL_COLLAPSE_RANGE) 28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 29 static_assert((FALLOC_FL_COLLAPSE_RANGE) == (0x08), "FALLOC_FL_COLLAPSE_RANGE != 0x08"); 30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 31 #else 32 # define FALLOC_FL_COLLAPSE_RANGE 0x08 33 #endif 34 #if defined(FALLOC_FL_ZERO_RANGE) || (defined(HAVE_DECL_FALLOC_FL_ZERO_RANGE) && HAVE_DECL_FALLOC_FL_ZERO_RANGE) 35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 36 static_assert((FALLOC_FL_ZERO_RANGE) == (0x10), "FALLOC_FL_ZERO_RANGE != 0x10"); 37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 38 #else 39 # define FALLOC_FL_ZERO_RANGE 0x10 40 #endif 41 #if defined(FALLOC_FL_INSERT_RANGE) || (defined(HAVE_DECL_FALLOC_FL_INSERT_RANGE) && HAVE_DECL_FALLOC_FL_INSERT_RANGE) 42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 43 static_assert((FALLOC_FL_INSERT_RANGE) == (0x20), "FALLOC_FL_INSERT_RANGE != 0x20"); 44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 45 #else 46 # define FALLOC_FL_INSERT_RANGE 0x20 47 #endif 48 #if defined(FALLOC_FL_UNSHARE_RANGE) || (defined(HAVE_DECL_FALLOC_FL_UNSHARE_RANGE) && HAVE_DECL_FALLOC_FL_UNSHARE_RANGE) 49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 50 static_assert((FALLOC_FL_UNSHARE_RANGE) == (0x40), "FALLOC_FL_UNSHARE_RANGE != 0x40"); 51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 52 #else 53 # define FALLOC_FL_UNSHARE_RANGE 0x40 54 #endif 55 56 #ifndef XLAT_MACROS_ONLY 57 58 # ifdef IN_MPERS 59 60 # error static const struct xlat falloc_flags in mpers mode 61 62 # else 63 64 static 65 const struct xlat falloc_flags[] = { 66 XLAT(FALLOC_FL_KEEP_SIZE), 67 XLAT(FALLOC_FL_PUNCH_HOLE), 68 XLAT(FALLOC_FL_NO_HIDE_STALE), 69 XLAT(FALLOC_FL_COLLAPSE_RANGE), 70 XLAT(FALLOC_FL_ZERO_RANGE), 71 XLAT(FALLOC_FL_INSERT_RANGE), 72 XLAT(FALLOC_FL_UNSHARE_RANGE), 73 XLAT_END 74 }; 75 76 # endif /* !IN_MPERS */ 77 78 #endif /* !XLAT_MACROS_ONLY */ 79