[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/4] qom: add default value
From: |
Maksim Davydov |
Subject: |
[PULL 1/4] qom: add default value |
Date: |
Mon, 4 Mar 2024 16:51:42 +0300 |
qmp_qom_list_properties can print default values if they are available
as qmp_device_list_properties does, because both of them use the
ObjectPropertyInfo structure with default_value field. This can be useful
when working with "not device" types (e.g. memory-backend).
Signed-off-by: Maksim Davydov <davydov-max@yandex-team.ru>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
---
qom/qom-qmp-cmds.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/qom/qom-qmp-cmds.c b/qom/qom-qmp-cmds.c
index 7c087299de..e91a235347 100644
--- a/qom/qom-qmp-cmds.c
+++ b/qom/qom-qmp-cmds.c
@@ -212,6 +212,7 @@ ObjectPropertyInfoList *qmp_qom_list_properties(const char
*typename,
info->name = g_strdup(prop->name);
info->type = g_strdup(prop->type);
info->description = g_strdup(prop->description);
+ info->default_value = qobject_ref(prop->defval);
QAPI_LIST_PREPEND(prop_list, info);
}
--
2.34.1
- [PULL 0/4] machine development tool, Maksim Davydov, 2024/03/04
- [PULL 2/4] qmp: add dump machine type compatibility properties, Maksim Davydov, 2024/03/04
- [PULL 1/4] qom: add default value,
Maksim Davydov <=
- [PULL 3/4] python/qemu/machine: add method to retrieve QEMUMachine::binary field, Maksim Davydov, 2024/03/04
- [PULL 4/4] scripts: add script to compare compatibility properties, Maksim Davydov, 2024/03/04
- Re: [PULL 0/4] machine development tool, Peter Maydell, 2024/03/05
- Re: [PULL 0/4] machine development tool, Markus Armbruster, 2024/03/05
- Re: [PULL 0/4] machine development tool, Peter Xu, 2024/03/05
- Re: [PULL 0/4] machine development tool, Maksim Davydov, 2024/03/07
- Re: [PULL 0/4] machine development tool, Peter Xu, 2024/03/07
- Re: [PULL 0/4] machine development tool, Vladimir Sementsov-Ogievskiy, 2024/03/18
- Re: [PULL 0/4] machine development tool, Peter Xu, 2024/03/18
- Re: [PULL 0/4] machine development tool, Maksim Davydov, 2024/03/18