From c84a8f01b2a5d8bf98c447796d4a747333a5b1fd Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Thu, 20 Aug 2015 14:54:27 -0700 Subject: machine: MACHINE_TYPE_NAME macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The macro will be useful to ensure the machine class names follow the right format to make machine class lookup by class name work correctly. Signed-off-by: Eduardo Habkost Reviewed-by: Marcel Apfelbaum Reviewed-by: David Gibson Signed-off-by: Andreas Färber --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index 3c6480d..3c6c9b0 100644 --- a/vl.c +++ b/vl.c @@ -1452,7 +1452,7 @@ static void qemu_machine_class_init(ObjectClass *oc, void *data) int qemu_register_machine(QEMUMachine *m) { - char *name = g_strconcat(m->name, TYPE_MACHINE_SUFFIX, NULL); + char *name = g_strdup_printf(MACHINE_TYPE_NAME("%s"), m->name); TypeInfo ti = { .name = name, .parent = TYPE_MACHINE, -- cgit v1.1