qemu-option: introduce qemu_opt_set_err()

This is like qemu_opt_set(), except that it takes an Error argument.

This new function allows for a incremental conversion of code using
qemu_opt_set().

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-By: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Luiz Capitulino 2012-03-21 16:17:21 -03:00
parent 584d4064c6
commit 384f2139ff
2 changed files with 8 additions and 0 deletions

View file

@ -669,6 +669,12 @@ int qemu_opt_set(QemuOpts *opts, const char *name, const char *value)
return 0;
}
void qemu_opt_set_err(QemuOpts *opts, const char *name, const char *value,
Error **errp)
{
opt_set(opts, name, value, false, errp);
}
int qemu_opt_set_bool(QemuOpts *opts, const char *name, bool val)
{
QemuOpt *opt;