|
From: | Lin Ma |
Subject: | Re: [Qemu-devel] [PATCH 1/2] object: Add can_be_deleted callback to TypeInfo and TypeImpl |
Date: | Mon, 23 Mar 2015 23:47:28 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
在 2015年03月23日 20:06, Paolo Bonzini 写道:
Well... Because I'm not familiar with qom very much, Let me dig more details about UserCreatable first :-)On 23/03/2015 11:36, Peter Crosthwaite wrote:I don't think TypeInfo is the right place for this. You can however define function hooks for Object in ObjectClass. See the unparent field of ObjectClass for a precedent.In this case, the right place could be UserCreatable. Alternatively...
But is a better way to do this to add error handling to object_unparent API and override object_unparent for your device in question to throw the error? Then your change doesn't have to be limited to QMP.... this is also a good choice. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |