/* Generated by ./src/xlat/gen.sh from ./src/xlat/ubi_data_types.in; do not edit. */ #include "gcc_compat.h" #include "static_assert.h" #if defined(UBI_LONGTERM) || (defined(HAVE_DECL_UBI_LONGTERM) && HAVE_DECL_UBI_LONGTERM) DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE static_assert((UBI_LONGTERM) == (1), "UBI_LONGTERM != 1"); DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE #else # define UBI_LONGTERM 1 #endif #if defined(UBI_SHORTTERM) || (defined(HAVE_DECL_UBI_SHORTTERM) && HAVE_DECL_UBI_SHORTTERM) DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE static_assert((UBI_SHORTTERM) == (2), "UBI_SHORTTERM != 2"); DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE #else # define UBI_SHORTTERM 2 #endif #if defined(UBI_UNKNOWN) || (defined(HAVE_DECL_UBI_UNKNOWN) && HAVE_DECL_UBI_UNKNOWN) DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE static_assert((UBI_UNKNOWN) == (3), "UBI_UNKNOWN != 3"); DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE #else # define UBI_UNKNOWN 3 #endif #undef XLAT_PREV_VAL #ifndef XLAT_MACROS_ONLY # ifdef IN_MPERS # error static const struct xlat ubi_data_types in mpers mode # else DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE static const struct xlat_data ubi_data_types_xdata[] = { XLAT(UBI_LONGTERM), #define XLAT_VAL_0 ((unsigned) (UBI_LONGTERM)) #define XLAT_STR_0 STRINGIFY(UBI_LONGTERM) XLAT(UBI_SHORTTERM), #define XLAT_VAL_1 ((unsigned) (UBI_SHORTTERM)) #define XLAT_STR_1 STRINGIFY(UBI_SHORTTERM) XLAT(UBI_UNKNOWN), #define XLAT_VAL_2 ((unsigned) (UBI_UNKNOWN)) #define XLAT_STR_2 STRINGIFY(UBI_UNKNOWN) }; static const struct xlat ubi_data_types[1] = { { .data = ubi_data_types_xdata, .size = ARRAY_SIZE(ubi_data_types_xdata), .type = XT_NORMAL, .flags_mask = 0 # ifdef XLAT_VAL_0 | XLAT_VAL_0 # endif # ifdef XLAT_VAL_1 | XLAT_VAL_1 # endif # ifdef XLAT_VAL_2 | XLAT_VAL_2 # endif , .flags_strsz = 0 # ifdef XLAT_STR_0 + sizeof(XLAT_STR_0) # endif # ifdef XLAT_STR_1 + sizeof(XLAT_STR_1) # endif # ifdef XLAT_STR_2 + sizeof(XLAT_STR_2) # endif , } }; DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE # undef XLAT_STR_0 # undef XLAT_VAL_0 # undef XLAT_STR_1 # undef XLAT_VAL_1 # undef XLAT_STR_2 # undef XLAT_VAL_2 # endif /* !IN_MPERS */ #endif /* !XLAT_MACROS_ONLY */