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 <famz@redhat.com>
Message-Id: <20170714021509.23681-5-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Fam Zheng
2017-07-14 12:04:42 +02:00
committed by Paolo Bonzini
parent 5b4ff3c661
commit 75ab905383
+2 -1
View File
@@ -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;