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>
diff --git a/blockdev.c b/blockdev.c
index b52ed9d..39e12a6 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -705,7 +705,7 @@
: 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 @@
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 @@
qemu_opt_set(opts, to, value, &error_abort);
qemu_opt_unset(opts, from);
}
+ return true;
}
QemuOptsList qemu_legacy_drive_opts = {