mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
qemu-option: 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-14-armbru@redhat.com>
This commit is contained in:
@ -705,7 +705,7 @@ BlockDriverState *bdrv_next_monitor_owned(BlockDriverState *bs)
|
||||
: QTAILQ_FIRST(&monitor_bdrv_states);
|
||||
}
|
||||
|
||||
static void qemu_opt_rename(QemuOpts *opts, const char *from, const char *to,
|
||||
static bool qemu_opt_rename(QemuOpts *opts, const char *from, const char *to,
|
||||
Error **errp)
|
||||
{
|
||||
const char *value;
|
||||
@ -715,7 +715,7 @@ static void qemu_opt_rename(QemuOpts *opts, const char *from, const char *to,
|
||||
if (qemu_opt_find(opts, to)) {
|
||||
error_setg(errp, "'%s' and its alias '%s' can't be used at the "
|
||||
"same time", to, from);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -724,6 +724,7 @@ static void qemu_opt_rename(QemuOpts *opts, const char *from, const char *to,
|
||||
qemu_opt_set(opts, to, value, &error_abort);
|
||||
qemu_opt_unset(opts, from);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
QemuOptsList qemu_legacy_drive_opts = {
|
||||
|
Reference in New Issue
Block a user