/* Generated by ./xlat/gen.sh from ./xlat/nbd_ioctl_flags.in; do not edit. */

#include "gcc_compat.h"
#include "static_assert.h"

#if defined(NBD_FLAG_HAS_FLAGS) || (defined(HAVE_DECL_NBD_FLAG_HAS_FLAGS) && HAVE_DECL_NBD_FLAG_HAS_FLAGS)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((NBD_FLAG_HAS_FLAGS) == ((1 << 0)), "NBD_FLAG_HAS_FLAGS != (1 << 0)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define NBD_FLAG_HAS_FLAGS (1 << 0)
#endif
#if defined(NBD_FLAG_READ_ONLY) || (defined(HAVE_DECL_NBD_FLAG_READ_ONLY) && HAVE_DECL_NBD_FLAG_READ_ONLY)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((NBD_FLAG_READ_ONLY) == ((1 << 1)), "NBD_FLAG_READ_ONLY != (1 << 1)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define NBD_FLAG_READ_ONLY (1 << 1)
#endif
#if defined(NBD_FLAG_SEND_FLUSH) || (defined(HAVE_DECL_NBD_FLAG_SEND_FLUSH) && HAVE_DECL_NBD_FLAG_SEND_FLUSH)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((NBD_FLAG_SEND_FLUSH) == ((1 << 2)), "NBD_FLAG_SEND_FLUSH != (1 << 2)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define NBD_FLAG_SEND_FLUSH (1 << 2)
#endif
#if defined(NBD_FLAG_SEND_FUA) || (defined(HAVE_DECL_NBD_FLAG_SEND_FUA) && HAVE_DECL_NBD_FLAG_SEND_FUA)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((NBD_FLAG_SEND_FUA) == ((1 << 3)), "NBD_FLAG_SEND_FUA != (1 << 3)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define NBD_FLAG_SEND_FUA (1 << 3)
#endif
#if defined(NBD_FLAG_ROTATIONAL) || (defined(HAVE_DECL_NBD_FLAG_ROTATIONAL) && HAVE_DECL_NBD_FLAG_ROTATIONAL)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((NBD_FLAG_ROTATIONAL) == ((1 << 4)), "NBD_FLAG_ROTATIONAL != (1 << 4)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define NBD_FLAG_ROTATIONAL (1 << 4)
#endif
#if defined(NBD_FLAG_SEND_TRIM) || (defined(HAVE_DECL_NBD_FLAG_SEND_TRIM) && HAVE_DECL_NBD_FLAG_SEND_TRIM)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((NBD_FLAG_SEND_TRIM) == ((1 << 5)), "NBD_FLAG_SEND_TRIM != (1 << 5)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define NBD_FLAG_SEND_TRIM (1 << 5)
#endif
#if defined(NBD_FLAG_SEND_WRITE_ZEROES) || (defined(HAVE_DECL_NBD_FLAG_SEND_WRITE_ZEROES) && HAVE_DECL_NBD_FLAG_SEND_WRITE_ZEROES)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((NBD_FLAG_SEND_WRITE_ZEROES) == ((1 << 6)), "NBD_FLAG_SEND_WRITE_ZEROES != (1 << 6)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define NBD_FLAG_SEND_WRITE_ZEROES (1 << 6)
#endif
#if defined(NBD_FLAG_SEND_DF) || (defined(HAVE_DECL_NBD_FLAG_SEND_DF) && HAVE_DECL_NBD_FLAG_SEND_DF)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((NBD_FLAG_SEND_DF) == ((1 << 7)), "NBD_FLAG_SEND_DF != (1 << 7)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define NBD_FLAG_SEND_DF (1 << 7)
#endif
#if defined(NBD_FLAG_CAN_MULTI_CONN) || (defined(HAVE_DECL_NBD_FLAG_CAN_MULTI_CONN) && HAVE_DECL_NBD_FLAG_CAN_MULTI_CONN)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((NBD_FLAG_CAN_MULTI_CONN) == ((1 << 8)), "NBD_FLAG_CAN_MULTI_CONN != (1 << 8)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define NBD_FLAG_CAN_MULTI_CONN (1 << 8)
#endif
#if defined(NBD_FLAG_SEND_RESIZE) || (defined(HAVE_DECL_NBD_FLAG_SEND_RESIZE) && HAVE_DECL_NBD_FLAG_SEND_RESIZE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((NBD_FLAG_SEND_RESIZE) == ((1 << 9)), "NBD_FLAG_SEND_RESIZE != (1 << 9)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define NBD_FLAG_SEND_RESIZE (1 << 9)
#endif
#if defined(NBD_FLAG_SEND_CACHE) || (defined(HAVE_DECL_NBD_FLAG_SEND_CACHE) && HAVE_DECL_NBD_FLAG_SEND_CACHE)
DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
static_assert((NBD_FLAG_SEND_CACHE) == ((1 << 10)), "NBD_FLAG_SEND_CACHE != (1 << 10)");
DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
#else
# define NBD_FLAG_SEND_CACHE (1 << 10)
#endif

#ifndef XLAT_MACROS_ONLY

# ifdef IN_MPERS

#  error static const struct xlat nbd_ioctl_flags in mpers mode

# else

static const struct xlat_data nbd_ioctl_flags_xdata[] = {
/*
* Some flags are not defined in <linux/nbd.h>, but are passed anyway.
* These flags are sent from nbd-server to the client, and the client
* passes them to the kernel unmodified after parsing. Both the client
* and the kernel ignore flags unknown to them.
*/


 XLAT(NBD_FLAG_HAS_FLAGS),
 #define XLAT_VAL_0 ((unsigned) (NBD_FLAG_HAS_FLAGS))
 #define XLAT_STR_0 STRINGIFY(NBD_FLAG_HAS_FLAGS)

 XLAT(NBD_FLAG_READ_ONLY),
 #define XLAT_VAL_1 ((unsigned) (NBD_FLAG_READ_ONLY))
 #define XLAT_STR_1 STRINGIFY(NBD_FLAG_READ_ONLY)

 XLAT(NBD_FLAG_SEND_FLUSH),
 #define XLAT_VAL_2 ((unsigned) (NBD_FLAG_SEND_FLUSH))
 #define XLAT_STR_2 STRINGIFY(NBD_FLAG_SEND_FLUSH)

 XLAT(NBD_FLAG_SEND_FUA),
 #define XLAT_VAL_3 ((unsigned) (NBD_FLAG_SEND_FUA))
 #define XLAT_STR_3 STRINGIFY(NBD_FLAG_SEND_FUA)

 XLAT(NBD_FLAG_ROTATIONAL),
 #define XLAT_VAL_4 ((unsigned) (NBD_FLAG_ROTATIONAL))
 #define XLAT_STR_4 STRINGIFY(NBD_FLAG_ROTATIONAL)

 XLAT(NBD_FLAG_SEND_TRIM),
 #define XLAT_VAL_5 ((unsigned) (NBD_FLAG_SEND_TRIM))
 #define XLAT_STR_5 STRINGIFY(NBD_FLAG_SEND_TRIM)

 XLAT(NBD_FLAG_SEND_WRITE_ZEROES),
 #define XLAT_VAL_6 ((unsigned) (NBD_FLAG_SEND_WRITE_ZEROES))
 #define XLAT_STR_6 STRINGIFY(NBD_FLAG_SEND_WRITE_ZEROES)

 XLAT(NBD_FLAG_SEND_DF),
 #define XLAT_VAL_7 ((unsigned) (NBD_FLAG_SEND_DF))
 #define XLAT_STR_7 STRINGIFY(NBD_FLAG_SEND_DF)

 XLAT(NBD_FLAG_CAN_MULTI_CONN),
 #define XLAT_VAL_8 ((unsigned) (NBD_FLAG_CAN_MULTI_CONN))
 #define XLAT_STR_8 STRINGIFY(NBD_FLAG_CAN_MULTI_CONN)

 XLAT(NBD_FLAG_SEND_RESIZE),
 #define XLAT_VAL_9 ((unsigned) (NBD_FLAG_SEND_RESIZE))
 #define XLAT_STR_9 STRINGIFY(NBD_FLAG_SEND_RESIZE)

 XLAT(NBD_FLAG_SEND_CACHE),
 #define XLAT_VAL_10 ((unsigned) (NBD_FLAG_SEND_CACHE))
 #define XLAT_STR_10 STRINGIFY(NBD_FLAG_SEND_CACHE)
};
static
const struct xlat nbd_ioctl_flags[1] = { {
 .data = nbd_ioctl_flags_xdata,
 .size = ARRAY_SIZE(nbd_ioctl_flags_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
#  ifdef XLAT_VAL_3
  | XLAT_VAL_3
#  endif
#  ifdef XLAT_VAL_4
  | XLAT_VAL_4
#  endif
#  ifdef XLAT_VAL_5
  | XLAT_VAL_5
#  endif
#  ifdef XLAT_VAL_6
  | XLAT_VAL_6
#  endif
#  ifdef XLAT_VAL_7
  | XLAT_VAL_7
#  endif
#  ifdef XLAT_VAL_8
  | XLAT_VAL_8
#  endif
#  ifdef XLAT_VAL_9
  | XLAT_VAL_9
#  endif
#  ifdef XLAT_VAL_10
  | XLAT_VAL_10
#  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
#  ifdef XLAT_STR_3
  + sizeof(XLAT_STR_3)
#  endif
#  ifdef XLAT_STR_4
  + sizeof(XLAT_STR_4)
#  endif
#  ifdef XLAT_STR_5
  + sizeof(XLAT_STR_5)
#  endif
#  ifdef XLAT_STR_6
  + sizeof(XLAT_STR_6)
#  endif
#  ifdef XLAT_STR_7
  + sizeof(XLAT_STR_7)
#  endif
#  ifdef XLAT_STR_8
  + sizeof(XLAT_STR_8)
#  endif
#  ifdef XLAT_STR_9
  + sizeof(XLAT_STR_9)
#  endif
#  ifdef XLAT_STR_10
  + sizeof(XLAT_STR_10)
#  endif
  ,
} };

#  undef XLAT_STR_0
#  undef XLAT_VAL_0
#  undef XLAT_STR_1
#  undef XLAT_VAL_1
#  undef XLAT_STR_2
#  undef XLAT_VAL_2
#  undef XLAT_STR_3
#  undef XLAT_VAL_3
#  undef XLAT_STR_4
#  undef XLAT_VAL_4
#  undef XLAT_STR_5
#  undef XLAT_VAL_5
#  undef XLAT_STR_6
#  undef XLAT_VAL_6
#  undef XLAT_STR_7
#  undef XLAT_VAL_7
#  undef XLAT_STR_8
#  undef XLAT_VAL_8
#  undef XLAT_STR_9
#  undef XLAT_VAL_9
#  undef XLAT_STR_10
#  undef XLAT_VAL_10
# endif /* !IN_MPERS */

#endif /* !XLAT_MACROS_ONLY */
