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: Gonglei (Arei)
Subject: Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties
Date: Tue, 23 Sep 2014 09:18:22 +0000

> Subject: Re: [PATCH 0/3] Fix confused output for alias properties
> 
> 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.
> 
> Paolo

Got it. Thanks for your point. :)

Best regards,
-Gonglei



reply via email to

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