From: Gonglei <arei.gong...@huawei.com> In this way, we can use target object and get its qdev property legacy_name etc.
Cc: Stefan Hajnoczi <stefa...@redhat.com> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Gonglei <arei.gong...@huawei.com> --- include/qom/object.h | 3 +++ qom/object.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h index 8a05a81..b8113cb 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -344,6 +344,9 @@ typedef struct ObjectProperty ObjectPropertyRelease *release; void *opaque; + bool is_alias; + Object *target_obj; + QTAILQ_ENTRY(ObjectProperty) node; } ObjectProperty; diff --git a/qom/object.c b/qom/object.c index e7b16a1..5e919b8 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1662,6 +1662,8 @@ void object_property_add_alias(Object *obj, const char *name, goto out; } op->resolve = property_resolve_alias; + op->is_alias = true; + op->target_obj = target_obj; out: g_free(prop_type); -- 1.7.12.4