1 /* Generated by ./xlat/gen.sh from ./xlat/sg_io_flags.in; do not edit. */ 2 3 #include "gcc_compat.h" 4 #include "static_assert.h" 5 6 #if defined(SG_FLAG_DIRECT_IO) || (defined(HAVE_DECL_SG_FLAG_DIRECT_IO) && HAVE_DECL_SG_FLAG_DIRECT_IO) 7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8 static_assert((SG_FLAG_DIRECT_IO) == (1), "SG_FLAG_DIRECT_IO != 1"); 9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10 #else 11 # define SG_FLAG_DIRECT_IO 1 12 #endif 13 #if defined(SG_FLAG_UNUSED_LUN_INHIBIT) || (defined(HAVE_DECL_SG_FLAG_UNUSED_LUN_INHIBIT) && HAVE_DECL_SG_FLAG_UNUSED_LUN_INHIBIT) 14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15 static_assert((SG_FLAG_UNUSED_LUN_INHIBIT) == (2), "SG_FLAG_UNUSED_LUN_INHIBIT != 2"); 16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17 #else 18 # define SG_FLAG_UNUSED_LUN_INHIBIT 2 19 #endif 20 #if defined(SG_FLAG_MMAP_IO) || (defined(HAVE_DECL_SG_FLAG_MMAP_IO) && HAVE_DECL_SG_FLAG_MMAP_IO) 21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22 static_assert((SG_FLAG_MMAP_IO) == (4), "SG_FLAG_MMAP_IO != 4"); 23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24 #else 25 # define SG_FLAG_MMAP_IO 4 26 #endif 27 #if defined(SG_FLAG_NO_DXFER) || (defined(HAVE_DECL_SG_FLAG_NO_DXFER) && HAVE_DECL_SG_FLAG_NO_DXFER) 28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 29 static_assert((SG_FLAG_NO_DXFER) == (0x10000), "SG_FLAG_NO_DXFER != 0x10000"); 30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 31 #else 32 # define SG_FLAG_NO_DXFER 0x10000 33 #endif 34 #if defined(SG_FLAG_Q_AT_TAIL) || (defined(HAVE_DECL_SG_FLAG_Q_AT_TAIL) && HAVE_DECL_SG_FLAG_Q_AT_TAIL) 35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 36 static_assert((SG_FLAG_Q_AT_TAIL) == (0x10), "SG_FLAG_Q_AT_TAIL != 0x10"); 37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 38 #else 39 # define SG_FLAG_Q_AT_TAIL 0x10 40 #endif 41 #if defined(SG_FLAG_Q_AT_HEAD) || (defined(HAVE_DECL_SG_FLAG_Q_AT_HEAD) && HAVE_DECL_SG_FLAG_Q_AT_HEAD) 42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 43 static_assert((SG_FLAG_Q_AT_HEAD) == (0x20), "SG_FLAG_Q_AT_HEAD != 0x20"); 44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 45 #else 46 # define SG_FLAG_Q_AT_HEAD 0x20 47 #endif 48 49 #ifndef XLAT_MACROS_ONLY 50 51 # ifdef IN_MPERS 52 53 extern const struct xlat sg_io_flags[]; 54 55 # else 56 57 # if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) 58 static 59 # endif 60 const struct xlat sg_io_flags[] = { 61 XLAT(SG_FLAG_DIRECT_IO), 62 XLAT(SG_FLAG_UNUSED_LUN_INHIBIT), 63 XLAT(SG_FLAG_MMAP_IO), 64 XLAT(SG_FLAG_NO_DXFER), 65 XLAT(SG_FLAG_Q_AT_TAIL), 66 XLAT(SG_FLAG_Q_AT_HEAD), 67 XLAT_END 68 }; 69 70 # endif /* !IN_MPERS */ 71 72 #endif /* !XLAT_MACROS_ONLY */ 73