diff mbox

[10/10] machine: Set MachineClass::name automatically

Message ID 20150904154612.GC5920@thinpad.lan.raisama.net
State New
Headers show

Commit Message

Eduardo Habkost Sept. 4, 2015, 3:46 p.m. UTC
On Thu, Aug 20, 2015 at 02:54:36PM -0700, Eduardo Habkost wrote:
> Now all TYPE_MACHINE subclasses use MACHINE_TYPE_NAME to generate the
> class name. So instead of requiring each subclass to set
> MachineClass::name manually, we can now set it automatically at the
> TYPE_MACHINE class_base_init() function.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

The s390-virtio-ccw machines are missing from this patch. The following
patch can be squashed into this one.

If a more formal follow-up patch or v2 patch is preferred, please let me
know.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
diff mbox

Patch

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 5bbafe0..fb0e742 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -297,7 +297,6 @@  static void ccw_machine_2_4_class_init(ObjectClass *oc, void *data)
         { /* end of list */ }
     };
 
-    mc->name = "s390-ccw-virtio-2.4";
     mc->desc = "VirtIO-ccw based S390 machine v2.4";
     mc->compat_props = compat_props;
 }
@@ -312,7 +311,6 @@  static void ccw_machine_2_5_class_init(ObjectClass *oc, void *data)
 {
     MachineClass *mc = MACHINE_CLASS(oc);
 
-    mc->name = "s390-ccw-virtio-2.5";
     mc->alias = "s390-ccw-virtio";
     mc->desc = "VirtIO-ccw based S390 machine v2.5";
     mc->is_default = 1;