mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-20 16:42:04 -06:00
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>
This commit is contained in:
parent
504189a96f
commit
8559e45e51
2 changed files with 162 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue