summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-02-12 16:37:44 +0100
committerMarkus Armbruster <armbru@redhat.com>2015-02-26 14:46:32 +0100
commitcccb7967bdf19f9d31e65d2d07d4d311e07545c4 (patch)
tree1521f4b26e1615206e2e7ecbb29221099156a9dc /vl.c
parentc5c6d7f81a6950d8e32a3b5a0bafd37bfa5a8e88 (diff)
downloadqemu-cccb7967bdf19f9d31e65d2d07d4d311e07545c4.tar.gz
QemuOpts: Convert qemu_opt_set_bool() to Error, fix its use
Return the Error object instead of reporting it with qerror_report_err(). Change callers that assume the function can't fail to pass &error_abort, so that should the assumption ever break, it'll break noisily. Turns out all callers outside its unit test assume that. We could drop the Error ** argument, but that would make the interface less regular, so don't. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index e1ffd0a96a..27e738a89e 100644
--- a/vl.c
+++ b/vl.c
@@ -2222,7 +2222,7 @@ static void monitor_parse(const char *optarg, const char *mode, bool pretty)
}
qemu_opt_set(opts, "mode", mode);
qemu_opt_set(opts, "chardev", label);
- qemu_opt_set_bool(opts, "pretty", pretty);
+ qemu_opt_set_bool(opts, "pretty", pretty, &error_abort);
if (def)
qemu_opt_set(opts, "default", "on");
monitor_device_index++;
@@ -3287,7 +3287,8 @@ int main(int argc, char **argv, char **envp)
}
qemu_opt_set_bool(fsdev, "readonly",
- qemu_opt_get_bool(opts, "readonly", 0));
+ qemu_opt_get_bool(opts, "readonly", 0),
+ &error_abort);
device = qemu_opts_create(qemu_find_opts("device"), NULL, 0,
&error_abort);
qemu_opt_set(device, "driver", "virtio-9p-pci");