aboutsummaryrefslogtreecommitdiff
path: root/qom/object_interfaces.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2017-08-24 16:23:13 -0300
committerEduardo Habkost <ehabkost@redhat.com>2017-09-19 09:09:23 -0300
commit9d5139e543e8579aacd324193680c64fd1463d89 (patch)
tree4f4964e485ea4e1de4a12ca057de4f422ba6a407 /qom/object_interfaces.c
parenta9158a5cba955b79d580a252cc58ff44d154e370 (diff)
vl: Clean up user-creatable objects when exiting
Delete all user-creatable objects in /objects when exiting QEMU, so they can perform cleanup actions. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20170824192315.5897-2-ehabkost@redhat.com> Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Zack Cornelius <zack.cornelius@kove.net> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'qom/object_interfaces.c')
-rw-r--r--qom/object_interfaces.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c
index 3bb8959f09..6824a88caa 100644
--- a/qom/object_interfaces.c
+++ b/qom/object_interfaces.c
@@ -193,6 +193,11 @@ void user_creatable_del(const char *id, Error **errp)
object_unparent(obj);
}
+void user_creatable_cleanup(void)
+{
+ object_unparent(object_get_objects_root());
+}
+
static void register_types(void)
{
static const TypeInfo uc_interface_info = {