Received: from eggs.gnu.org ([2001:4830:134:3::10]:57769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXkLU-000669-Aj for qemu-devel@nongnu.org; Sat, 27 Sep 2014 01:15:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXkLP-0007IX-HV for qemu-devel@nongnu.org; Sat, 27 Sep 2014 01:15:00 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:41246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXkLO-0007HZ-KI for qemu-devel@nongnu.org; Sat, 27 Sep 2014 01:14:55 -0400 From: Date: Sat, 27 Sep 2014 13:13:59 +0800 Message-ID: <1411794841-9672-6-git-send-email-arei.gonglei@huawei.com> In-Reply-To: <1411794841-9672-1-git-send-email-arei.gonglei@huawei.com> References: <1411794841-9672-1-git-send-email-arei.gonglei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v3 5/7] qdev: set the object property's description to the qdev property's. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: weidong.huang@huawei.com, aliguori@amazon.com, mst@redhat.com, armbru@redhat.com, luonengjun@huawei.com, peter.huangpeng@huawei.com, lcapitulino@redhat.com, Gonglei , stefanha@redhat.com, pbonzini@redhat.com, afaerber@suse.de From: Gonglei 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 Cc: Michael S. Tsirkin Cc: Markus Armbruster Signed-off-by: Gonglei --- 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