diff options
author | Markus Armbruster <armbru@redhat.com> | 2013-07-04 15:09:19 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-07-09 13:38:57 -0500 |
commit | 7f9d6e540ec4f3bf4dc3501c4a1405998c2be4e7 (patch) | |
tree | c5abfb88b7c31ccc1b5d304c8223c51b4a00b304 /vl.c | |
parent | 6d4cd408686f5ae60b2b3b94b79f48ddedc2f39d (diff) | |
download | qemu-7f9d6e540ec4f3bf4dc3501c4a1405998c2be4e7.tar.gz qemu-7f9d6e540ec4f3bf4dc3501c4a1405998c2be4e7.tar.bz2 qemu-7f9d6e540ec4f3bf4dc3501c4a1405998c2be4e7.zip |
vl: New qemu_get_machine_opts()
To be used in the next few commits to fix or clean up queries of
"machine" options (-machine and its sugared forms).
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372943363-24081-4-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -516,6 +516,25 @@ static QemuOptsList qemu_realtime_opts = { }, }; +/** + * Get machine options + * + * Returns: machine options (never null). + */ +QemuOpts *qemu_get_machine_opts(void) +{ + QemuOptsList *list; + QemuOpts *opts; + + list = qemu_find_opts("machine"); + assert(list); + opts = qemu_opts_find(list, NULL); + if (!opts) { + opts = qemu_opts_create_nofail(list); + } + return opts; +} + const char *qemu_get_vm_name(void) { return qemu_name; |