From 1b2aee0a86541b8ab30f7fd6478b854da2ff71d7 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Sun, 11 Mar 2018 14:20:49 -0400 Subject: [PATCH] arm: Rename virt machine class to use MACHINE_TYPE_NAME 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. Backports commit 64d3459c8586c8821970cbc99450340278507cfe from qemu --- qemu/hw/arm/virt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qemu/hw/arm/virt.c b/qemu/hw/arm/virt.c index 3d21d069..0b55fdfd 100644 --- a/qemu/hw/arm/virt.c +++ b/qemu/hw/arm/virt.c @@ -50,7 +50,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(uc, obj) \ OBJECT_CHECK((uc), VirtMachineState, (obj), TYPE_VIRT_MACHINE) #define VIRT_MACHINE_GET_CLASS(uc, obj) \ @@ -120,7 +121,7 @@ static void virt_class_init(struct uc_struct *uc, ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(uc, oc); - mc->name = TYPE_VIRT_MACHINE; + mc->name = VIRT_MACHINE_NAME; mc->init = machvirt_init; mc->max_cpus = 8; mc->is_default = 1;