From: Gonglei <arei.gong...@huawei.com> Set all static qdev properties' descriptions to object property's description.
When we call object_property_add_alias() adding alias properties to the source object on the target Object, set the object property's description to the source qdev property's. Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Michael S. Tsirkin <m...@redhat.com> Cc: Markus Armbruster <arm...@redhat.com> Signed-off-by: Gonglei <arei.gong...@huawei.com> --- hw/core/qdev.c | 5 +++++ qom/object.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index fcb1638..a270a91 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -766,6 +766,11 @@ void qdev_property_add_static(DeviceState *dev, Property *prop, error_propagate(errp, local_err); return; } + + object_property_set_description(obj, prop->name, + prop->info->description, + &error_abort); + if (prop->qtype == QTYPE_NONE) { return; } diff --git a/qom/object.c b/qom/object.c index c9b67cf..56ace2f 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1674,6 +1674,10 @@ void object_property_add_alias(Object *obj, const char *name, } op->resolve = property_resolve_alias; + object_property_set_description(obj, name, + target_prop->description, + &error_abort); + out: g_free(prop_type); } -- 1.7.12.4