Add a const pointer to QAPITypeInfo in ObjectProperty. NULL for now, but future patches will add means to make it non-null. The QAPITypeInfo will then be used by QOM introspection to tie the property to a QAPI type.
Signed-off-by: Marc-André Lureau <[email protected]> --- include/qom/object.h | 2 ++ qom/object.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h index 7ecd0f210fb6..7c7e69a2a1bb 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -15,6 +15,7 @@ #define QEMU_OBJECT_H #include "qapi/qapi-builtin-types.h" +#include "qapi/qapi-type-info.h" #include "qemu/module.h" struct TypeImpl; @@ -91,6 +92,7 @@ struct ObjectProperty char *name; char *type; char *description; + const QAPITypeInfo *qapi_type; ObjectPropertyAccessor *get; ObjectPropertyAccessor *set; ObjectPropertyResolve *resolve; diff --git a/qom/object.c b/qom/object.c index b1834a57cc9b..f782e21f1a30 100644 --- a/qom/object.c +++ b/qom/object.c @@ -3112,6 +3112,7 @@ object_property_add_alias(Object *obj, const char *name, property_release_alias, prop); op->resolve = property_resolve_alias; + op->qapi_type = target_prop->qapi_type; if (target_prop->defval) { op->defval = qobject_ref(target_prop->defval); } -- 2.55.0.543.g5ebe2ebe4ea8
