From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWTV3-0003eA-Lz for qemu-devel@nongnu.org; Tue, 23 Sep 2014 13:03:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWTUy-0005Kr-8P for qemu-devel@nongnu.org; Tue, 23 Sep 2014 13:03:37 -0400 Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]:41619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWTUy-0005JB-3z for qemu-devel@nongnu.org; Tue, 23 Sep 2014 13:03:32 -0400 Received: by mail-qg0-f48.google.com with SMTP id z107so4774367qgd.21 for ; Tue, 23 Sep 2014 10:03:26 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5421A7D7.7050804@redhat.com> Date: Tue, 23 Sep 2014 19:03:19 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1411477717-6988-1-git-send-email-arei.gonglei@huawei.com> <1411477717-6988-6-git-send-email-arei.gonglei@huawei.com> In-Reply-To: <1411477717-6988-6-git-send-email-arei.gonglei@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 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: arei.gonglei@huawei.com, qemu-devel@nongnu.org Cc: weidong.huang@huawei.com, stefanha@redhat.com, mst@redhat.com, luonengjun@huawei.com, peter.huangpeng@huawei.com, armbru@redhat.com, aliguori@amazon.com, lcapitulino@redhat.com, afaerber@suse.de Il 23/09/2014 15:08, arei.gonglei@huawei.com ha scritto: > From: Gonglei > > When we call qdev_alias_all_properties() adding alias properties to > the source object all qdev properties on the target DeviceState, > set the object property's description to the qdev property's. > > c: Paolo Bonzini > Cc: Michael S. Tsirkin > Cc: Markus Armbruster > Signed-off-by: Gonglei > --- > hw/core/qdev.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/core/qdev.c b/hw/core/qdev.c > index fcb1638..61d352c 100644 > --- a/hw/core/qdev.c > +++ b/hw/core/qdev.c > @@ -796,6 +796,9 @@ void qdev_alias_all_properties(DeviceState *target, Object *source) > object_property_add_alias(source, prop->name, > OBJECT(target), prop->name, > &error_abort); > + object_property_set_description(source, prop->name, > + prop->info->description, > + &error_abort); Please do this directly in object_property_add_alias. Paolo > } > class = object_class_get_parent(class); > } while (class != object_class_by_name(TYPE_DEVICE)); >