qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties
Date: Tue, 23 Sep 2014 11:13:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Paolo Bonzini <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]