aboutsummaryrefslogtreecommitdiff
path: root/hw/xen
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-12-12 18:01:23 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2019-01-07 16:18:41 +0400
commit88cbe0737401843c550f79f611193455c6380bcc (patch)
tree859006ff2038e0e311fa5dd137e6bf617e7c6257 /hw/xen
parentb66bbee39f6deb28f0645760c536cbf2189a0687 (diff)
machine: move compat properties out of globals
Move the compat arrays inside functions that use them. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/xen')
-rw-r--r--hw/xen/xen-common.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/hw/xen/xen-common.c b/hw/xen/xen-common.c
index 4532aa8632..d51148b6b3 100644
--- a/hw/xen/xen-common.c
+++ b/hw/xen/xen-common.c
@@ -159,27 +159,26 @@ static int xen_init(MachineState *ms)
return 0;
}
-static GlobalProperty xen_compat_props[] = {
- {
- .driver = "migration",
- .property = "store-global-state",
- .value = "off",
- },
- {
- .driver = "migration",
- .property = "send-configuration",
- .value = "off",
- },
- {
- .driver = "migration",
- .property = "send-section-footer",
- .value = "off",
- }
-};
-
static void xen_accel_class_init(ObjectClass *oc, void *data)
{
AccelClass *ac = ACCEL_CLASS(oc);
+ static GlobalProperty compat[] = {
+ {
+ .driver = "migration",
+ .property = "store-global-state",
+ .value = "off",
+ },
+ {
+ .driver = "migration",
+ .property = "send-configuration",
+ .value = "off",
+ },
+ {
+ .driver = "migration",
+ .property = "send-section-footer",
+ .value = "off",
+ }
+ };
ac->name = "Xen";
ac->init_machine = xen_init;
@@ -187,8 +186,7 @@ static void xen_accel_class_init(ObjectClass *oc, void *data)
ac->allowed = &xen_allowed;
ac->compat_props = g_ptr_array_new();
- compat_props_add(ac->compat_props,
- xen_compat_props, G_N_ELEMENTS(xen_compat_props));
+ compat_props_add(ac->compat_props, compat, G_N_ELEMENTS(compat));
}
#define TYPE_XEN_ACCEL ACCEL_CLASS_NAME("xen")