aboutsummaryrefslogtreecommitdiff
path: root/qemu-config.c
diff options
context:
space:
mode:
authorDong Xu Wang <wdongxu@linux.vnet.ibm.com>2012-12-06 14:47:22 +0800
committerKevin Wolf <kwolf@redhat.com>2012-12-11 16:35:47 +0100
commite478b448d7c36046462733ffaeaea0961575790a (patch)
treea2b06f9ce8a74c39da739dbc16eca0a6be4eeb2e /qemu-config.c
parentdd39244978627e41a66b98d20eceddb1d7d25def (diff)
downloadqemu-e478b448d7c36046462733ffaeaea0961575790a.zip
qemu-e478b448d7c36046462733ffaeaea0961575790a.tar.gz
qemu-e478b448d7c36046462733ffaeaea0961575790a.tar.bz2
use qemu_opts_create_nofail
We will use qemu_opts_create_nofail function, it can make code more readable. Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-config.c')
-rw-r--r--qemu-config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-config.c b/qemu-config.c
index aa78fb9..54db981 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -756,7 +756,7 @@ int qemu_global_option(const char *str)
return -1;
}
- opts = qemu_opts_create(&qemu_global_opts, NULL, 0, NULL);
+ opts = qemu_opts_create_nofail(&qemu_global_opts);
qemu_opt_set(opts, "driver", driver);
qemu_opt_set(opts, "property", property);
qemu_opt_set(opts, "value", str+offset+1);
@@ -843,7 +843,7 @@ int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname)
error_free(local_err);
goto out;
}
- opts = qemu_opts_create(list, NULL, 0, NULL);
+ opts = qemu_opts_create_nofail(list);
continue;
}
if (sscanf(line, " %63s = \"%1023[^\"]\"", arg, value) == 2) {