Paolo Bonzini <pbonz...@redhat.com> writes:

> Il 23/09/2014 05:09, Gonglei (Arei) ha scritto:
>> Hi,
>> 
>>>>>>> This doesn't change the fact that ObjectProperty is a generic struct,
>>>>>>> and adding alias-specific fields there is wrong.
>>>>>>
>>>>>> OK, Maybe I should find other ways to attach this purpose and
>>>>>> avoid layering violation. Thanks!
>>>>>
>>>>> Unfortunately I cannot think of any.
>>>>>
>>>>> We could add a description field to ObjectProperty, and replace
>>>>> legacy_name with a description.  The output then would be
>>>>>
>>>>> virtio-blk.drive=str (drive)
>> 
>> There is a question that the QOM properties are added dynamically.
>> When we call qdev_alias_all_properties() adding alias properties to
>> the source object all qdev properties on the target DeviceState, how do we
>> judge the property's name and set the value of corresponding
>> description field?
>> Such as setting virtio-blk-pci.drive.description = "drive".
>
> You use the legacy_name field of PropertyInfo to set the description of
> a qdev property, and then let object_property_add_alias() copy the
> description.

Gets us part of the way to what I described in my reply.  I'm fine with
that.

Reply via email to