[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties i
From: |
Alexey Kardashevskiy |
Subject: |
Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific |
Date: |
Wed, 2 May 2018 19:33:21 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
On 2/5/18 7:11 pm, Paolo Bonzini wrote:
> On 02/05/2018 08:34, Markus Armbruster wrote:
>> Alexey Kardashevskiy <address@hidden> writes:
>>
>>> On 30/4/18 7:39 pm, Paolo Bonzini wrote:
>>>> On 30/04/2018 08:52, Alexey Kardashevskiy wrote:
>>>>> diff --git a/qapi/misc.json b/qapi/misc.json
>>>>> index 5636f4a..399ec74 100644
>>>>> --- a/qapi/misc.json
>>>>> +++ b/qapi/misc.json
>>>>> @@ -1491,6 +1491,10 @@
>>>>> #
>>>>> # List properties associated with a device.
>>>>> #
>>>>> +# Note: the handler creates a device object, enumerates properties and
>>>>> destroys
>>>>> +# the object so it only lists properties defined in DeviceClass::props or
>>>>> +# created by DeviceClass::init()/TypeInfo::instance_init().
>>>>> +#
>>>>> # @typename: the type name of a device
>>>>> #
>>>>> # Returns: a list of ObjectPropertyInfo describing a devices properties
>>>>> @@ -1506,6 +1510,11 @@
>>>>> #
>>>>> # List properties associated with a QOM object.
>>>>> #
>>>>> +# Note: the handler creates an object, enumerates properties and destroys
>>>>> +# the object so it only lists properties created in
>>>>> TypeInfo::instance_init().
>>>>> +# Since the instance_init() callback of the device object adds
>>>>> +# DeviceClass::props as object properties, they will be listed as well.
>>>>> +#
>>>>
>>>> This says what it does, but not why it is a problem. Can you explain
>>>> that to me as well?
>>>
>>> It probably is not unless someone adds properties in realize() callback,
>>
>> Now work that into the doc comment, please :)
>
> Are there any examples? If not, that belongs in a comment in the code
There are roughly 400 of realize(), this is will take a bit of time :)
imho what it does belongs to .json, why it does exactly that belongs to the
git commit log. I'll walk through the realize() hook though, educate
myself, at least :)
> rather than the QAPI doc comment. If yes, then the doc comment should
> include one.
>
> Paolo
>
--
Alexey
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Eric Blake, 2018/05/01
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Markus Armbruster, 2018/05/02
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Paolo Bonzini, 2018/05/02
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Markus Armbruster, 2018/05/02
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Paolo Bonzini, 2018/05/02
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Markus Armbruster, 2018/05/02
- Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific, Paolo Bonzini, 2018/05/02