diff mbox

[13/13] qtest: Use qemu_opt_set() instead of qemu_opts_parse()

Message ID 1424097865-3973-14-git-send-email-armbru@redhat.com
State New
Headers show

Commit Message

Markus Armbruster Feb. 16, 2015, 2:44 p.m. UTC
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qtest.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

Comments

Eric Blake Feb. 17, 2015, 4:47 p.m. UTC | #1
On 02/16/2015 07:44 AM, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  qtest.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>
diff mbox

Patch

diff --git a/qtest.c b/qtest.c
index 2bca04e..8d1e66c 100644
--- a/qtest.c
+++ b/qtest.c
@@ -520,16 +520,13 @@  static void qtest_event(void *opaque, int event)
     }
 }
 
-static void configure_qtest_icount(const char *options)
+static int qtest_init_accel(MachineState *ms)
 {
-    QemuOpts *opts  = qemu_opts_parse(qemu_find_opts("icount"), options, 1);
+    QemuOpts *opts = qemu_opts_create(qemu_find_opts("icount"), NULL, 0,
+                                      &error_abort);
+    qemu_opt_set(opts, "shift", "0", &error_abort);
     configure_icount(opts, &error_abort);
     qemu_opts_del(opts);
-}
-
-static int qtest_init_accel(MachineState *ms)
-{
-    configure_qtest_icount("0");
     return 0;
 }