diff options
author | Sebastian Tanase <sebastian.tanase@openwide.fr> | 2014-07-25 11:56:28 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-08-06 17:53:07 +0200 |
commit | 1ad9580bd730f195a59136d11fdc431f90f266aa (patch) | |
tree | a133036f4721959ce831bc0206c79dff7dc3ab96 /qtest.c | |
parent | 714683950547ea8173aefe25f574874c06233455 (diff) | |
download | qemu-1ad9580bd730f195a59136d11fdc431f90f266aa.tar.gz qemu-1ad9580bd730f195a59136d11fdc431f90f266aa.tar.bz2 qemu-1ad9580bd730f195a59136d11fdc431f90f266aa.zip |
icount: Add QemuOpts for icount
Make icount parameter use QemuOpts style options in order
to easily add other suboptions.
Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr>
Tested-by: Camille Bégué <camille.begue@openwide.fr>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qtest.c')
-rw-r--r-- | qtest.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -19,6 +19,9 @@ #include "hw/irq.h" #include "sysemu/sysemu.h" #include "sysemu/cpus.h" +#include "qemu/config-file.h" +#include "qemu/option.h" +#include "qemu/error-report.h" #define MAX_IRQ 256 @@ -509,10 +512,16 @@ static void qtest_event(void *opaque, int event) } } -int qtest_init_accel(MachineClass *mc) +static void configure_qtest_icount(const char *options) { - configure_icount("0"); + QemuOpts *opts = qemu_opts_parse(qemu_find_opts("icount"), options, 1); + configure_icount(opts, &error_abort); + qemu_opts_del(opts); +} +int qtest_init_accel(MachineClass *mc) +{ + configure_qtest_icount("0"); return 0; } |