summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChunyan Liu2014-06-05 11:20:48 +0200
committerStefan Hajnoczi2014-06-16 11:23:20 +0200
commit8559e45e51edd22dd48d54cce8b0521e6339f3e9 (patch)
treed07bd68af6757b77411918abc590e6c564c9a250 /include
parentQemuOpts: add qemu_opts_print_help to replace print_option_help (diff)
downloadqemu-8559e45e51edd22dd48d54cce8b0521e6339f3e9.tar.gz
qemu-8559e45e51edd22dd48d54cce8b0521e6339f3e9.tar.xz
qemu-8559e45e51edd22dd48d54cce8b0521e6339f3e9.zip
QemuOpts: add conversion between QEMUOptionParameter to QemuOpts
Add two temp conversion functions between QEMUOptionParameter to QemuOpts, so that next patch can use it. It will simplify later patch for easier review. And will be finally removed after all backend drivers switch to QemuOpts. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Leandro Dorileo <l@dorileo.org> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/option.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/qemu/option.h b/include/qemu/option.h
index fbf5dc2275..e98e8efbc1 100644
--- a/include/qemu/option.h
+++ b/include/qemu/option.h
@@ -103,6 +103,12 @@ typedef struct QemuOptDesc {
} QemuOptDesc;
struct QemuOptsList {
+ /* FIXME: Temp used for QEMUOptionParamter->QemuOpts conversion to
+ * indicate the need to free memory. Will remove after all drivers
+ * switch to QemuOpts.
+ */
+ bool allocated;
+
const char *name;
const char *implied_opt_name;
bool merge_lists; /* Merge multiple uses of option into a single list? */
@@ -167,5 +173,8 @@ void qemu_opts_print(QemuOpts *opts);
int qemu_opts_foreach(QemuOptsList *list, qemu_opts_loopfunc func, void *opaque,
int abort_on_failure);
void qemu_opts_print_help(QemuOptsList *list);
+void qemu_opts_free(QemuOptsList *list);
+QEMUOptionParameter *opts_to_params(QemuOpts *opts);
+QemuOptsList *params_to_opts(QEMUOptionParameter *list);
#endif