qemu-options-wrapper.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #if defined(QEMU_OPTIONS_GENERATE_ENUM)
  2. #define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \
  3. opt_enum,
  4. #define DEFHEADING(text)
  5. #define ARCHHEADING(text, arch_mask)
  6. #elif defined(QEMU_OPTIONS_GENERATE_HELP)
  7. #define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \
  8. if ((arch_mask) & arch_type) \
  9. fputs(opt_help, stdout);
  10. #define ARCHHEADING(text, arch_mask) \
  11. if ((arch_mask) & arch_type) \
  12. puts(stringify(text));
  13. #define DEFHEADING(text) ARCHHEADING(text, QEMU_ARCH_ALL)
  14. #elif defined(QEMU_OPTIONS_GENERATE_OPTIONS)
  15. #define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \
  16. { option, opt_arg, opt_enum, arch_mask },
  17. #define DEFHEADING(text)
  18. #define ARCHHEADING(text, arch_mask)
  19. #else
  20. #error "qemu-options-wrapper.h included with no option defined"
  21. #endif
  22. #include "qemu-options.def"
  23. #undef DEF
  24. #undef DEFHEADING
  25. #undef ARCHHEADING
  26. #undef GEN_DOCS
  27. #undef QEMU_OPTIONS_GENERATE_ENUM
  28. #undef QEMU_OPTIONS_GENERATE_HELP
  29. #undef QEMU_OPTIONS_GENERATE_OPTIONS