summaryrefslogtreecommitdiff
path: root/accel.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2014-09-26 17:45:18 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2014-10-04 08:59:15 +0200
commite54adde6154fc86e52abb911e7c0604c9dc7a58a (patch)
treea5bfc1c835163b864510dcb4644c5f40b30b6fb9 /accel.c
parenta1a9cb0ccd9aa6f0afcf151006fd981ec39ffa15 (diff)
downloadqemu-e54adde6154fc86e52abb911e7c0604c9dc7a58a.tar.gz
qemu-e54adde6154fc86e52abb911e7c0604c9dc7a58a.tar.bz2
qemu-e54adde6154fc86e52abb911e7c0604c9dc7a58a.zip
accel: Create AccelType typedef
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'accel.c')
-rw-r--r--accel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/accel.c b/accel.c
index 9424796b8b..3cefd7451c 100644
--- a/accel.c
+++ b/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 },