aboutsummaryrefslogtreecommitdiff
path: root/util/qemu-config.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-02-20 12:04:02 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-02-20 12:10:23 +0000
commit4c0c9bbe78901a706497a8fa1a27935bafc20cf7 (patch)
tree43fe900e8e748606dcdb0ef22d10068cc4608aaa /util/qemu-config.c
parent46eef33b89e936ca793e13c4aeea1414e97e8dbb (diff)
parent1094fd3a6219923c8d1abfc7dee5af996a181e7a (diff)
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp: monitor: Add object_add class argument completion. monitor: Add object_del id argument completion. monitor: Add device_add device argument completion. monitor: Add device_del id argument completion. qmp: expose list of supported character device backends Use error_is_set() only when necessary QMP: allow JSON dict arguments in qmp-shell hmp: migrate command (without -d) now blocks correctly Conflicts: blockdev.c [PMM: resolved trivial conflict in blockdev.c] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util/qemu-config.c')
-rw-r--r--util/qemu-config.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/qemu-config.c b/util/qemu-config.c
index 9298f55ecf..797df71569 100644
--- a/util/qemu-config.c
+++ b/util/qemu-config.c
@@ -31,7 +31,7 @@ QemuOptsList *qemu_find_opts(const char *group)
Error *local_err = NULL;
ret = find_list(vm_config_groups, group, &local_err);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_report("%s", error_get_pretty(local_err));
error_free(local_err);
}
@@ -295,7 +295,7 @@ int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname)
if (sscanf(line, "[%63s \"%63[^\"]\"]", group, id) == 2) {
/* group with id */
list = find_list(lists, group, &local_err);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_report("%s", error_get_pretty(local_err));
error_free(local_err);
goto out;
@@ -306,7 +306,7 @@ int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname)
if (sscanf(line, "[%63[^]]]", group) == 1) {
/* group without id */
list = find_list(lists, group, &local_err);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_report("%s", error_get_pretty(local_err));
error_free(local_err);
goto out;
@@ -376,13 +376,13 @@ static void config_parse_qdict_section(QDict *options, QemuOptsList *opts,
}
subopts = qemu_opts_create(opts, NULL, 0, &local_err);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
goto out;
}
qemu_opts_absorb_qdict(subopts, subqdict, &local_err);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
goto out;
}
@@ -416,13 +416,13 @@ static void config_parse_qdict_section(QDict *options, QemuOptsList *opts,
opt_name = g_strdup_printf("%s.%u", opts->name, i++);
subopts = qemu_opts_create(opts, opt_name, 1, &local_err);
g_free(opt_name);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
goto out;
}
qemu_opts_absorb_qdict(subopts, section, &local_err);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
qemu_opts_del(subopts);
goto out;
@@ -450,7 +450,7 @@ void qemu_config_parse_qdict(QDict *options, QemuOptsList **lists,
for (i = 0; lists[i]; i++) {
config_parse_qdict_section(options, lists[i], &local_err);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
return;
}