[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 6/7] qmp: print descriptions of object proper
From: |
Gonglei |
Subject: |
Re: [Qemu-devel] [PATCH v2 6/7] qmp: print descriptions of object properties |
Date: |
Fri, 26 Sep 2014 20:11:19 +0800 |
Hi, Paolo
> > static DevicePropertyInfo *make_device_property_info(ObjectClass *klass,
> > const
> char *name,
> > - const char
> *default_type)
> > + const char
> *default_type,
> > + const char
> *description)
> > {
> > DevicePropertyInfo *info;
> > Property *prop;
> > @@ -465,7 +466,12 @@ static DevicePropertyInfo
> *make_device_property_info(ObjectClass *klass,
> >
> > info = g_malloc0(sizeof(*info));
> > info->name = g_strdup(prop->name);
> > - info->type = g_strdup(prop->info->legacy_name ?:
> prop->info->name);
> > + if (prop->info->description) {
> > + info->type = g_strdup_printf("%s (%s)",
> prop->info->name,
> > +
> prop->info->description);
> > + } else {
> > + info->type = g_strdup(prop->info->name);
> > + }
> > return info;
> > }
> > klass = object_class_get_parent(klass);
> > @@ -474,7 +480,11 @@ static DevicePropertyInfo
> *make_device_property_info(ObjectClass *klass,
> > /* Not a qdev property, use the default type */
> > info = g_malloc0(sizeof(*info));
> > info->name = g_strdup(name);
> > - info->type = g_strdup(default_type);
> > + if (description) {
> > + info->type = g_strdup_printf("%s (%s)", default_type, description);
>
> Please add a new "description" field to DevicePropertyInfo, and format
> it in qdev_device_help.
>
> You can send v3 of just this patch.
>
OK, will do it. Thanks! :)
Best regards,
-Gonglei
- [Qemu-devel] [PATCH v2 0/7] add description field in ObjectProperty and PropertyInfo struct, arei.gonglei, 2014/09/24
- [Qemu-devel] [PATCH v2 1/7] qom: add error handler for object_property_print(), arei.gonglei, 2014/09/24
- [Qemu-devel] [PATCH v2 7/7] qdev: drop legacy_name from qdev properties, arei.gonglei, 2014/09/24
- [Qemu-devel] [PATCH v2 6/7] qmp: print descriptions of object properties, arei.gonglei, 2014/09/24
- [Qemu-devel] [PATCH v2 2/7] qom: add error handler for object alias property, arei.gonglei, 2014/09/24
- [Qemu-devel] [PATCH v2 3/7] qdev: add description field in PropertyInfo struct, arei.gonglei, 2014/09/24
- [Qemu-devel] [PATCH v2 5/7] qdev: set the object property's description to the qdev property's., arei.gonglei, 2014/09/24
- [Qemu-devel] [PATCH v2 4/7] qom: add description field in ObjectProperty struct, arei.gonglei, 2014/09/24