From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXX0t-0005ox-7U for qemu-devel@nongnu.org; Fri, 26 Sep 2014 11:01:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXX0j-0000hz-Sn for qemu-devel@nongnu.org; Fri, 26 Sep 2014 11:00:50 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:54619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXX0j-0000gh-J6 for qemu-devel@nongnu.org; Fri, 26 Sep 2014 11:00:41 -0400 Received: by mail-wg0-f41.google.com with SMTP id k14so9920080wgh.12 for ; Fri, 26 Sep 2014 08:00:35 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <54257F8F.9060908@redhat.com> Date: Fri, 26 Sep 2014 17:00:31 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1409344310-5441-1-git-send-email-ehabkost@redhat.com> <1409344310-5441-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1409344310-5441-4-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 03/17] accel: Create AccelType typedef List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , qemu-devel@nongnu.org Cc: Michael Mueller , "Michael S. Tsirkin" , Marcel Apfelbaum , Alexander Graf , Christian Borntraeger , "Jason J. Herne" , =?windows-1252?Q?Andreas_?= =?windows-1252?Q?F=E4rber?= Il 29/08/2014 22:31, Eduardo Habkost ha scritto: > 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 }, > Reviewed-by: Paolo Bonzini