aboutsummaryrefslogtreecommitdiff
path: root/qmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'qmp.c')
-rw-r--r--qmp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/qmp.c b/qmp.c
index 7a9de06af4..b86201e349 100644
--- a/qmp.c
+++ b/qmp.c
@@ -430,10 +430,15 @@ static void qom_list_types_tramp(ObjectClass *klass, void *data)
{
ObjectTypeInfoList *e, **pret = data;
ObjectTypeInfo *info;
+ ObjectClass *parent = object_class_get_parent(klass);
info = g_malloc0(sizeof(*info));
info->name = g_strdup(object_class_get_name(klass));
info->has_abstract = info->abstract = object_class_is_abstract(klass);
+ if (parent) {
+ info->has_parent = true;
+ info->parent = g_strdup(object_class_get_name(parent));
+ }
e = g_malloc0(sizeof(*e));
e->value = info;