From: Fam Zheng Date: Fri, 14 Jul 2017 02:14:53 +0000 (+0800) Subject: qmp: Use ObjectProperty.type if present X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=75ab905383ea92d1c44cdd07e0f9fd509d51c9cc;p=qemu.git qmp: Use ObjectProperty.type if present The dynamic value is more informative in the case of link property, otherwise it is the same. Signed-off-by: Fam Zheng Message-Id: <20170714021509.23681-5-famz@redhat.com> Signed-off-by: Paolo Bonzini --- diff --git a/qmp.c b/qmp.c index e6b68fe798..2cd40c3080 100644 --- a/qmp.c +++ b/qmp.c @@ -486,7 +486,8 @@ static DevicePropertyInfo *make_device_property_info(ObjectClass *klass, info = g_malloc0(sizeof(*info)); info->name = g_strdup(prop->name); - info->type = g_strdup(prop->info->name); + info->type = default_type ? g_strdup(default_type) + : g_strdup(prop->info->name); info->has_description = !!prop->info->description; info->description = g_strdup(prop->info->description); return info;