Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Peter Crosthwaite
On Fri, May 23, 2014 at 12:38 AM, Stefan Hajnoczi wrote: > On Fri, May 23, 2014 at 12:02:44AM +1000, Peter Crosthwaite wrote: >> On Thu, May 22, 2014 at 6:22 AM, Stefan Hajnoczi wrote: >> > +void object_property_add_alias(Object *obj, const char *name, >> > + Object

Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Stefan Hajnoczi
On Thu, May 22, 2014 at 04:05:46PM +0200, Igor Mammedov wrote: > On Wed, 21 May 2014 22:22:46 +0200 > Stefan Hajnoczi wrote: > > > Sometimes an object needs to present a property which is actually on > > another object, or it needs to provide an alias name for an existing > > property. > > > > E

Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Stefan Hajnoczi
On Fri, May 23, 2014 at 12:02:44AM +1000, Peter Crosthwaite wrote: > On Thu, May 22, 2014 at 6:22 AM, Stefan Hajnoczi wrote: > > +void object_property_add_alias(Object *obj, const char *name, > > + Object *target_obj, const char *target_name, > > +

Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Igor Mammedov
On Wed, 21 May 2014 22:22:46 +0200 Stefan Hajnoczi wrote: > Sometimes an object needs to present a property which is actually on > another object, or it needs to provide an alias name for an existing > property. > > Examples: > a.foo -> b.foo > a.old_name -> a.new_name this could be used for

Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Andreas Färber
Am 22.05.2014 16:02, schrieb Peter Crosthwaite: > On Thu, May 22, 2014 at 6:22 AM, Stefan Hajnoczi wrote: >> diff --git a/include/qom/object.h b/include/qom/object.h >> index a641dcd..70cbd13 100644 >> --- a/include/qom/object.h >> +++ b/include/qom/object.h >> @@ -1203,6 +1203,24 @@ void object_p

Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Peter Crosthwaite
On Thu, May 22, 2014 at 6:22 AM, Stefan Hajnoczi wrote: > Sometimes an object needs to present a property which is actually on > another object, or it needs to provide an alias name for an existing > property. > > Examples: > a.foo -> b.foo > a.old_name -> a.new_name > > The new object_propert

Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Paolo Bonzini
Il 22/05/2014 12:23, Stefan Hajnoczi ha scritto: I had an intermediate version of this patch with a flag so you could tell object_property_add_alias() whether or not to ref the target object. But in the end it seems like overengineering since the refcount case is rare or non-existent. The refco

Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-22 Thread Stefan Hajnoczi
On Thu, May 22, 2014 at 12:05 AM, Paolo Bonzini wrote: > Il 21/05/2014 22:22, Stefan Hajnoczi ha scritto: >> +void object_property_add_alias(Object *obj, const char *name, >> + Object *target_obj, const char >> *target_name, >> + Error **

Re: [Qemu-devel] [PATCH 1/7] qom: add object_property_add_alias()

2014-05-21 Thread Paolo Bonzini
Il 21/05/2014 22:22, Stefan Hajnoczi ha scritto: Sometimes an object needs to present a property which is actually on another object, or it needs to provide an alias name for an existing property. Examples: a.foo -> b.foo a.old_name -> a.new_name The new object_property_add_alias() API allo