aboutsummaryrefslogtreecommitdiff
path: root/block/nfs.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-06-14 21:14:33 +0200
committerKevin Wolf <kwolf@redhat.com>2018-06-15 14:49:44 +0200
commitaf91062ee1408f7f5bb58389d355d29a5040c648 (patch)
treecf745cb42a9189cef01e0a14d1d8543e123de892 /block/nfs.c
parent92adf9dbcd3cf9cedddae995b04a99f5c42ae08c (diff)
block: Factor out qobject_input_visitor_new_flat_confused()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/nfs.c')
-rw-r--r--block/nfs.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/block/nfs.c b/block/nfs.c
index 6935b611cc..743ca0450e 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -556,20 +556,17 @@ static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(QDict *options,
Error **errp)
{
BlockdevOptionsNfs *opts = NULL;
- QObject *crumpled = NULL;
Visitor *v;
const QDictEntry *e;
Error *local_err = NULL;
- crumpled = qdict_crumple_for_keyval_qiv(options, errp);
- if (crumpled == NULL) {
+ v = qobject_input_visitor_new_flat_confused(options, errp);
+ if (!v) {
return NULL;
}
- v = qobject_input_visitor_new_keyval(crumpled);
visit_type_BlockdevOptionsNfs(v, NULL, &opts, &local_err);
visit_free(v);
- qobject_unref(crumpled);
if (local_err) {
error_propagate(errp, local_err);