diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-01-10 19:30:38 +0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-01-24 20:59:16 +0100 |
commit | 1bb3d7d92c9e39ec2d45a830d8654e6ec11a60d3 (patch) | |
tree | f587d3ac149ec5e38194107a7e3f8ae074cd86c0 /qom | |
parent | 4df8161673dbaa1938652313c075c898a476ffe5 (diff) |
qapi/qmp: add ObjectPropertyInfo.default-value
Report the default value associated with a property.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20200110153039.1379601-26-marcandre.lureau@redhat.com>
[Report it as type "any", not string. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qom')
-rw-r--r-- | qom/qom-qmp-cmds.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qom/qom-qmp-cmds.c b/qom/qom-qmp-cmds.c index 8785816c1f..6136efec16 100644 --- a/qom/qom-qmp-cmds.c +++ b/qom/qom-qmp-cmds.c @@ -177,6 +177,8 @@ ObjectPropertyInfoList *qmp_device_list_properties(const char *typename, info->type = g_strdup(prop->type); info->has_description = !!prop->description; info->description = g_strdup(prop->description); + info->default_value = qobject_ref(prop->defval); + info->has_default_value = !!info->default_value; entry = g_malloc0(sizeof(*entry)); entry->value = info; |