qom: Demote already-has-a-parent to a regular error
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Fri, 26 Sep 2014 05:19:52 +0000 (22:19 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Oct 2014 14:41:25 +0000 (16:41 +0200)
commit8faa2f8571e399ba486bad00e25b6c9b22b6fd9a
treed1141cca524db9e0f39dc0a802d88ea7a13e07cd
parentd3c4931647c16c2ffc09a2c7c80d71c73cd026c6
qom: Demote already-has-a-parent to a regular error

Rather than an abort(). This allows callers to decide whether parenting
an already-parented object is a fatal error condition.

Useful for providing a default value for an object's parent in the case
where you want to set one iff it doesn't already have one.

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qom/object.c