Message ID | 1409344310-5441-4-git-send-email-ehabkost@redhat.com |
---|---|
State | New |
Headers | show |
Il 29/08/2014 22:31, Eduardo Habkost ha scritto: > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> > --- > hw/core/accel.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/hw/core/accel.c b/hw/core/accel.c > index 04da696..c23c04b 100644 > --- a/hw/core/accel.c > +++ b/hw/core/accel.c > @@ -40,13 +40,15 @@ static int tcg_init(MachineClass *mc) > return 0; > } > > -static struct { > +typedef struct AccelType { > const char *opt_name; > const char *name; > int (*available)(void); > int (*init)(MachineClass *mc); > bool *allowed; > -} accel_list[] = { > +} AccelType; > + > +static AccelType accel_list[] = { > { "tcg", "tcg", tcg_available, tcg_init, &tcg_allowed }, > { "xen", "Xen", xen_available, xen_init, &xen_allowed }, > { "kvm", "KVM", kvm_available, kvm_init, &kvm_allowed }, > Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
diff --git a/hw/core/accel.c b/hw/core/accel.c index 04da696..c23c04b 100644 --- a/hw/core/accel.c +++ b/hw/core/accel.c @@ -40,13 +40,15 @@ static int tcg_init(MachineClass *mc) return 0; } -static struct { +typedef struct AccelType { const char *opt_name; const char *name; int (*available)(void); int (*init)(MachineClass *mc); bool *allowed; -} accel_list[] = { +} AccelType; + +static AccelType accel_list[] = { { "tcg", "tcg", tcg_available, tcg_init, &tcg_allowed }, { "xen", "Xen", xen_available, xen_init, &xen_allowed }, { "kvm", "KVM", kvm_available, kvm_init, &kvm_allowed },
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- hw/core/accel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)