summary refs log tree commit diff stats
path: root/include/qemu/option.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2018-01-11 17:37:23 +0100
committerKevin Wolf <kwolf@redhat.com>2018-03-09 15:17:47 +0100
commit72215395b9e44f13be48e8576b90719738766edf (patch)
tree2ccaae522d7413ce5e1f9b693920b3cf18de05a3 /include/qemu/option.h
parente4b5dad8269b1b629c52be25e6da50644293abf7 (diff)
downloadfocaccia-qemu-72215395b9e44f13be48e8576b90719738766edf.tar.gz
focaccia-qemu-72215395b9e44f13be48e8576b90719738766edf.zip
util: Add qemu_opts_to_qdict_filtered()
This allows, given a QemuOpts for a QemuOptsList that was merged from
multiple QemuOptsList, to only consider those options that exist in one
specific list. Block drivers need this to separate format-layer create
options from protocol-level options.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/qemu/option.h')
-rw-r--r--include/qemu/option.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/qemu/option.h b/include/qemu/option.h
index b127fb6db6..306fdb5f7a 100644
--- a/include/qemu/option.h
+++ b/include/qemu/option.h
@@ -124,6 +124,8 @@ void qemu_opts_set_defaults(QemuOptsList *list, const char *params,
                             int permit_abbrev);
 QemuOpts *qemu_opts_from_qdict(QemuOptsList *list, const QDict *qdict,
                                Error **errp);
+QDict *qemu_opts_to_qdict_filtered(QemuOpts *opts, QDict *qdict,
+                                   QemuOptsList *list, bool del);
 QDict *qemu_opts_to_qdict(QemuOpts *opts, QDict *qdict);
 void qemu_opts_absorb_qdict(QemuOpts *opts, QDict *qdict, Error **errp);