summaryrefslogtreecommitdiffstats
path: root/include/qemu/option.h
diff options
context:
space:
mode:
authorChunyan Liu <cyliu@suse.com>2014-06-05 17:20:48 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2014-06-16 17:23:20 +0800
commit8559e45e51edd22dd48d54cce8b0521e6339f3e9 (patch)
treed07bd68af6757b77411918abc590e6c564c9a250 /include/qemu/option.h
parent504189a96fdee5916073858f0e60f33e0275454a (diff)
downloadhqemu-8559e45e51edd22dd48d54cce8b0521e6339f3e9.zip
hqemu-8559e45e51edd22dd48d54cce8b0521e6339f3e9.tar.gz
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/qemu/option.h')
-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 fbf5dc2..e98e8ef 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
OpenPOWER on IntegriCloud