]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qmp.c
qmp: Use ObjectProperty.type if present
[mirror_qemu.git] / qmp.c
diff --git a/qmp.c b/qmp.c
index e6b68fe7983f2d43d4fd1306df57f4d3cf2279a2..2cd40c3080e75ad0d9c945c2555185b5f05c5223 100644 (file)
--- 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;