From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcAu4-0000ws-Ia for qemu-devel@nongnu.org; Thu, 09 Oct 2014 06:25:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcAtt-0002SR-VM for qemu-devel@nongnu.org; Thu, 09 Oct 2014 06:25:00 -0400 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:38982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcAtt-0002SD-Nn for qemu-devel@nongnu.org; Thu, 09 Oct 2014 06:24:49 -0400 Received: by mail-wi0-f177.google.com with SMTP id fb4so1277318wid.16 for ; Thu, 09 Oct 2014 03:24:49 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 9 Oct 2014 12:17:16 +0200 Message-Id: <1412849855-12661-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1412849438-12274-1-git-send-email-pbonzini@redhat.com> References: <1412849438-12274-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 09/28] accel: Create AccelType typedef List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost From: Eduardo Habkost Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost Signed-off-by: Paolo Bonzini --- accel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/accel.c b/accel.c index 9424796..3cefd74 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 }, -- 1.8.3.1