[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/28] accel: Create AccelType typedef
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 09/28] accel: Create AccelType typedef |
Date: |
Thu, 9 Oct 2014 12:17:16 +0200 |
From: Eduardo Habkost <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
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
- [Qemu-devel] [PULL 28/28] qemu-char: Fix reconnect socket error reporting, (continued)
- [Qemu-devel] [PULL 28/28] qemu-char: Fix reconnect socket error reporting, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 25/28] virtio-scsi: fix use-after-free of VirtIOSCSIReq, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 24/28] linuxboot: compute initrd loading address, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 07/28] vl.c: Small coding style fix, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 16/28] accel: Move Xen registration code to xen-common.c, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 15/28] accel: Move KVM accel registration to kvm-all.c, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 10/28] accel: Simplify configure_accelerator() using AccelType *acc variable, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 11/28] accel: Move accel name lookup to separate function, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 14/28] accel: Report unknown accelerator as "not found" instead of "does not exist", Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 12/28] accel: Use QOM classes for accel types, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 09/28] accel: Create AccelType typedef,
Paolo Bonzini <=
- [Qemu-devel] [PULL 13/28] accel: Make AccelClass.available() optional, Paolo Bonzini, 2014/10/09
- [Qemu-devel] [PULL 08/28] accel: Move accel code to accel.c, Paolo Bonzini, 2014/10/09
- Re: [Qemu-devel] [PULL 00/28] Changes for 2014-10-09, Peter Maydell, 2014/10/09