aboutsummaryrefslogtreecommitdiff
path: root/qom/object_interfaces.c
diff options
context:
space:
mode:
Diffstat (limited to 'qom/object_interfaces.c')
-rw-r--r--qom/object_interfaces.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c
index 6360818397..a66cd6026c 100644
--- a/qom/object_interfaces.c
+++ b/qom/object_interfaces.c
@@ -18,6 +18,18 @@ void user_creatable_complete(Object *obj, Error **errp)
}
}
+bool user_creatable_can_be_deleted(UserCreatable *uc, Error **errp)
+{
+
+ UserCreatableClass *ucc = USER_CREATABLE_GET_CLASS(uc);
+
+ if (ucc->can_be_deleted) {
+ return ucc->can_be_deleted(uc, errp);
+ } else {
+ return true;
+ }
+}
+
static void register_types(void)
{
static const TypeInfo uc_interface_info = {