qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 04/10] arm: Rename virt machine class to use MACHINE


From: Eduardo Habkost
Subject: [Qemu-devel] [PATCH 04/10] arm: Rename virt machine class to use MACHINE_TYPE_NAME
Date: Thu, 20 Aug 2015 14:54:30 -0700

Machine class names should use the "-machine" suffix to allow
class-name-based machine class lookup to work. Rename the arm virt
machine class using the MACHINE_TYPE_NAME macro.

Cc: Peter Maydell <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
 hw/arm/virt.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index d5a8417..5ba4b80 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -81,7 +81,8 @@ typedef struct {
     bool secure;
 } VirtMachineState;
 
-#define TYPE_VIRT_MACHINE   "virt"
+#define VIRT_MACHINE_NAME   "virt"
+#define TYPE_VIRT_MACHINE   MACHINE_TYPE_NAME(VIRT_MACHINE_NAME)
 #define VIRT_MACHINE(obj) \
     OBJECT_CHECK(VirtMachineState, (obj), TYPE_VIRT_MACHINE)
 #define VIRT_MACHINE_GET_CLASS(obj) \
@@ -959,7 +960,7 @@ static void virt_class_init(ObjectClass *oc, void *data)
 {
     MachineClass *mc = MACHINE_CLASS(oc);
 
-    mc->name = TYPE_VIRT_MACHINE;
+    mc->name = VIRT_MACHINE_NAME;
     mc->desc = "ARM Virtual Machine",
     mc->init = machvirt_init;
     mc->max_cpus = 8;
-- 
2.1.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]