[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 25/26] qapi/qmp: add ObjectPropertyInfo.default-value
From: |
Marc-André Lureau |
Subject: |
Re: [PATCH 25/26] qapi/qmp: add ObjectPropertyInfo.default-value |
Date: |
Wed, 11 Dec 2019 21:41:56 +0400 |
Hi
On Wed, Dec 11, 2019 at 8:12 PM Eric Blake <address@hidden> wrote:
>
> On 12/1/19 5:15 AM, Marc-André Lureau wrote:
> > Report the default value associated with a property.
> >
> > Signed-off-by: Marc-André Lureau <address@hidden>
> > ---
> > qapi/qom.json | 7 ++++++-
> > qom/qom-qmp-cmds.c | 4 ++++
> > 2 files changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/qapi/qom.json b/qapi/qom.json
> > index 32db96ffc4..471e4b484b 100644
> > --- a/qapi/qom.json
> > +++ b/qapi/qom.json
> > @@ -26,10 +26,15 @@
> > #
> > # @description: if specified, the description of the property.
> > #
> > +# @default-value: the default value, if any (since 5.0)
> > +#
> > # Since: 1.2
> > ##
> > { 'struct': 'ObjectPropertyInfo',
> > - 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
> > + 'data': { 'name': 'str',
> > + 'type': 'str',
> > + '*description': 'str',
> > + '*default-value': 'str' } }
>
> Do we always want to output the stringized value, or would it be wise to
> make this 'any' and output integers where that makes sense?
Good point, it should work with 'any', I'll give it a try.
thanks
--
Marc-André Lureau
- [PATCH 17/26] object: release all props, (continued)
- [PATCH 17/26] object: release all props, Marc-André Lureau, 2019/12/01
- [PATCH 18/26] object: return self in object_ref(), Marc-André Lureau, 2019/12/01
- [PATCH 20/26] qdev: move instance properties to class properties, Marc-André Lureau, 2019/12/01
- [PATCH 21/26] qdev: register properties as class properties, Marc-André Lureau, 2019/12/01
- [PATCH 19/26] qdev: set properties with device_class_set_props(), Marc-André Lureau, 2019/12/01
- [PATCH 22/26] vl: print default value in object help, Marc-André Lureau, 2019/12/01
- [PATCH 23/26] qom: simplify qmp_device_list_properties(), Marc-André Lureau, 2019/12/01
- [PATCH 24/26] qom: introduce object_property_help(), Marc-André Lureau, 2019/12/01
- [PATCH 25/26] qapi/qmp: add ObjectPropertyInfo.default-value, Marc-André Lureau, 2019/12/01
- [PATCH 26/26] qdev: use object_property_help(), Marc-André Lureau, 2019/12/01