diff options
author | Chunyan Liu <cyliu@suse.com> | 2014-06-05 17:20:48 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-06-16 17:23:20 +0800 |
commit | 8559e45e51edd22dd48d54cce8b0521e6339f3e9 (patch) | |
tree | d07bd68af6757b77411918abc590e6c564c9a250 /include/qemu | |
parent | 504189a96fdee5916073858f0e60f33e0275454a (diff) | |
download | qemu-8559e45e51edd22dd48d54cce8b0521e6339f3e9.zip qemu-8559e45e51edd22dd48d54cce8b0521e6339f3e9.tar.gz qemu-8559e45e51edd22dd48d54cce8b0521e6339f3e9.tar.bz2 |
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')
-rw-r--r-- | include/qemu/option.h | 9 |
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 |