aboutsummaryrefslogtreecommitdiff
path: root/include/hw/boards.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/boards.h')
-rw-r--r--include/hw/boards.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 8d4fe56b5f..d268bd00a9 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -114,7 +114,7 @@ struct MachineClass {
const char *default_machine_opts;
const char *default_boot_order;
const char *default_display;
- GlobalProperty *compat_props;
+ GArray *compat_props;
const char *hw_version;
ram_addr_t default_ram_size;
bool option_rom_has_mr;
@@ -154,6 +154,7 @@ struct MachineState {
bool iommu;
bool suppress_vmdesc;
bool enforce_config_section;
+ bool enable_graphics;
ram_addr_t ram_size;
ram_addr_t maxram_size;
@@ -185,11 +186,18 @@ struct MachineState {
#define SET_MACHINE_COMPAT(m, COMPAT) \
do { \
+ int i; \
static GlobalProperty props[] = { \
COMPAT \
{ /* end of list */ } \
}; \
- (m)->compat_props = props; \
+ if (!m->compat_props) { \
+ m->compat_props = g_array_new(false, false, sizeof(void *)); \
+ } \
+ for (i = 0; props[i].driver != NULL; i++) { \
+ GlobalProperty *prop = &props[i]; \
+ g_array_append_val(m->compat_props, prop); \
+ } \
} while (0)
#endif