Skip to content

Commit

Permalink
accel: Create AccelType typedef
Browse files Browse the repository at this point in the history
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
ehabkost authored and bonzini committed Oct 4, 2014
1 parent a1a9cb0 commit e54adde
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions accel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down

0 comments on commit e54adde

Please sign in to comment.