Re: [Qemu-devel] [PATCH qom-next 2/7] qom: Add get_id

2012-06-08 Thread Eric Blake
On 06/08/2012 01:44 AM, Anthony Liguori wrote: > Since qdev->id is NULL 90% of the time, I don't think a user can > realistically rely on it. I don't think changing the type of the data > in the error is going to be a problem. > > Doesn't libvirt ignore the contents of an error object? Libvirt

Re: [Qemu-devel] [PATCH qom-next 2/7] qom: Add get_id

2012-06-08 Thread Andreas Färber
Am 08.06.2012 09:44, schrieb Anthony Liguori: > On 06/08/2012 03:11 PM, Andreas Färber wrote: >> Am 08.06.2012 03:22, schrieb Anthony Liguori: >>> On 06/08/2012 03:31 AM, Andreas Färber wrote: From: Paolo Bonzini Some classes may present objects differently in errors, for example if

Re: [Qemu-devel] [PATCH qom-next 2/7] qom: Add get_id

2012-06-08 Thread Anthony Liguori
On 06/08/2012 03:11 PM, Andreas Färber wrote: Am 08.06.2012 03:22, schrieb Anthony Liguori: On 06/08/2012 03:31 AM, Andreas Färber wrote: From: Paolo Bonzini Some classes may present objects differently in errors, for example if they are not part of the composition tree or if they are not assi

Re: [Qemu-devel] [PATCH qom-next 2/7] qom: Add get_id

2012-06-08 Thread Andreas Färber
Am 08.06.2012 03:22, schrieb Anthony Liguori: > On 06/08/2012 03:31 AM, Andreas Färber wrote: >> From: Paolo Bonzini >> >> Some classes may present objects differently in errors, for example if >> they >> are not part of the composition tree or if they are not assigned an id by >> the user. Let th

Re: [Qemu-devel] [PATCH qom-next 2/7] qom: Add get_id

2012-06-07 Thread Anthony Liguori
On 06/08/2012 03:31 AM, Andreas Färber wrote: From: Paolo Bonzini Some classes may present objects differently in errors, for example if they are not part of the composition tree or if they are not assigned an id by the user. Let them do this with a get_id method on Object, and use the method c

[Qemu-devel] [PATCH qom-next 2/7] qom: Add get_id

2012-06-07 Thread Andreas Färber
From: Paolo Bonzini Some classes may present objects differently in errors, for example if they are not part of the composition tree or if they are not assigned an id by the user. Let them do this with a get_id method on Object, and use the method consistently where a %(device) appears in the er