Re: [Qemu-devel] [RFC PATCH] generalize QOM path resolution

2012-01-30 Thread Paolo Bonzini
On 01/30/2012 03:28 PM, Anthony Liguori wrote: You are not going to have anyway a link. That makes it fine to resolve a link and a link according to different rules. I think we agreed (in IRC) that we can handle this by changing qdev_resolve_path() to take an optional TYPE argument which will

Re: [Qemu-devel] [RFC PATCH] generalize QOM path resolution

2012-01-30 Thread Anthony Liguori
On 01/30/2012 08:03 AM, Paolo Bonzini wrote: On 01/30/2012 02:39 PM, Anthony Liguori wrote: On 01/30/2012 06:53 AM, Paolo Bonzini wrote: Right now, resolving a string to an object is not generic to QOM, but rather it is entirely embedded in qdev (the Device class). This embryo patch generalizes

Re: [Qemu-devel] [RFC PATCH] generalize QOM path resolution

2012-01-30 Thread Paolo Bonzini
On 01/30/2012 02:39 PM, Anthony Liguori wrote: On 01/30/2012 06:53 AM, Paolo Bonzini wrote: Right now, resolving a string to an object is not generic to QOM, but rather it is entirely embedded in qdev (the Device class). This embryo patch generalizes the concept adding a resolve_path class metho

Re: [Qemu-devel] [RFC PATCH] generalize QOM path resolution

2012-01-30 Thread Anthony Liguori
On 01/30/2012 06:53 AM, Paolo Bonzini wrote: Right now, resolving a string to an object is not generic to QOM, but rather it is entirely embedded in qdev (the Device class). This embryo patch generalizes the concept adding a resolve_path class method, and get_canonical_path instance method, to Ob

[Qemu-devel] [RFC PATCH] generalize QOM path resolution

2012-01-30 Thread Paolo Bonzini
Right now, resolving a string to an object is not generic to QOM, but rather it is entirely embedded in qdev (the Device class). This embryo patch generalizes the concept adding a resolve_path class method, and get_canonical_path instance method, to Object. Link properties use the type to direct se