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>
This commit is contained in:
Markus Armbruster 2020-07-07 18:05:55 +02:00
parent 5325cc34a2
commit 6fd5bef10b
6 changed files with 122 additions and 62 deletions

View file

@ -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: