Received: from eggs.gnu.org ([2001:4830:134:3::10]:58725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4zyv-0007Rb-NC for qemu-devel@nongnu.org; Wed, 09 Jul 2014 18:04:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4zyp-0008Gu-HU for qemu-devel@nongnu.org; Wed, 09 Jul 2014 18:04:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4zyp-0008Gf-7l for qemu-devel@nongnu.org; Wed, 09 Jul 2014 18:04:47 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s69M4jov006063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 9 Jul 2014 18:04:46 -0400 From: Eduardo Habkost Date: Wed, 9 Jul 2014 19:04:00 -0300 Message-Id: <1404943462-711-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1404943462-711-1-git-send-email-ehabkost@redhat.com> References: <1404943462-711-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [RFC 03/25] accel: Create struct AccelType List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Eduardo Habkost --- 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 }, -- 1.9.3