aboutsummaryrefslogtreecommitdiff
path: root/include/qom/object_interfaces.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-07-07 18:05:55 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-07-10 15:18:08 +0200
commit6fd5bef10b8f0bf64df4e800bfda1da5fe17ca82 (patch)
tree40f3471de7e651e1325a733dc056c330f9552ef4 /include/qom/object_interfaces.h
parent5325cc34a2ca985283134c7e264be7851b112d4e (diff)
qom: Make functions taking Error ** return bool, not void
See recent commit "error: Document Error API usage rules" for rationale. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20200707160613.848843-28-armbru@redhat.com>
Diffstat (limited to 'include/qom/object_interfaces.h')
-rw-r--r--include/qom/object_interfaces.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/qom/object_interfaces.h b/include/qom/object_interfaces.h
index 65172120fa..7035829337 100644
--- a/include/qom/object_interfaces.h
+++ b/include/qom/object_interfaces.h
@@ -57,8 +57,10 @@ typedef struct UserCreatableClass {
* Wrapper to call complete() method if one of types it's inherited
* from implements USER_CREATABLE interface, otherwise the call does
* nothing.
+ *
+ * Returns: %true on success, %false on failure.
*/
-void user_creatable_complete(UserCreatable *uc, Error **errp);
+bool user_creatable_complete(UserCreatable *uc, Error **errp);
/**
* user_creatable_can_be_deleted:
@@ -100,8 +102,10 @@ Object *user_creatable_add_type(const char *type, const char *id,
* @qdict. The object type is taken from the QDict key 'qom-type', its
* ID from the key 'id'. The remaining entries in @qdict are used to
* initialize the object properties.
+ *
+ * Returns: %true on success, %false on failure.
*/
-void user_creatable_add_dict(QDict *qdict, bool keyval, Error **errp);
+bool user_creatable_add_dict(QDict *qdict, bool keyval, Error **errp);
/**
* user_creatable_add_opts:
@@ -167,8 +171,10 @@ bool user_creatable_print_help(const char *type, QemuOpts *opts);
*
* Delete an instance of the user creatable object identified
* by @id.
+ *
+ * Returns: %true on success, %false on failure.
*/
-void user_creatable_del(const char *id, Error **errp);
+bool user_creatable_del(const char *id, Error **errp);
/**
* user_creatable_cleanup: