Re: [Qemu-devel] [RFC v0] HACK: qom: object_property_set: abort on failure

2012-08-20 Thread Peter Crosthwaite
On Mon, Aug 20, 2012 at 9:02 PM, Andreas Färber wrote: > Am 20.08.2012 04:18, schrieb Peter Crosthwaite: >> [...] Here's my code as it stands: >> >> Error *errp = NULL; >> object_property_set_link(OBJECT(dev), OBJECT(cpus[0]), "cpu0", &errp); >> assert_no_error(errp); > > There's two pitfalls ther

Re: [Qemu-devel] [RFC v0] HACK: qom: object_property_set: abort on failure

2012-08-20 Thread Andreas Färber
Am 20.08.2012 04:18, schrieb Peter Crosthwaite: > [...] Here's my code as it stands: > > Error *errp = NULL; > object_property_set_link(OBJECT(dev), OBJECT(cpus[0]), "cpu0", &errp); > assert_no_error(errp); There's two pitfalls there, the needed object_property_add_link() that you stumbled over a

Re: [Qemu-devel] [RFC v0] HACK: qom: object_property_set: abort on failure

2012-08-19 Thread Peter Crosthwaite
On Tue, Aug 14, 2012 at 10:50 PM, Anthony Liguori wrote: > "Peter A. G. Crosthwaite" writes: > >> Hi All. A couple of times now ive had debug issues due to silent failure of >> object_property_set. This function silently fails if the requested property >> does not exist for the target object. To

Re: [Qemu-devel] [RFC v0] HACK: qom: object_property_set: abort on failure

2012-08-14 Thread Anthony Liguori
"Peter A. G. Crosthwaite" writes: > Hi All. A couple of times now ive had debug issues due to silent failure of > object_property_set. This function silently fails if the requested property > does not exist for the target object. To trap this error I applied the patch > below to my tree, but I am

[Qemu-devel] [RFC v0] HACK: qom: object_property_set: abort on failure

2012-08-13 Thread Peter A. G. Crosthwaite
Hi All. A couple of times now ive had debug issues due to silent failure of object_property_set. This function silently fails if the requested property does not exist for the target object. To trap this error I applied the patch below to my tree, but I am assuming that this is not mergeable as is a