Patchwork [PULL,1/6] qemu-char: Fix ringbuf option size

login
register
mail settings
Submitter Luiz Capitulino
Date July 10, 2013, 5:52 p.m.
Message ID <1373478767-20965-2-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/258181/
State New
Headers show

Comments

Luiz Capitulino - July 10, 2013, 5:52 p.m.
From: Markus Armbruster <armbru@redhat.com>

Any attempt to use it trips an "opt->desc->type == QEMU_OPT_NUMBER"
assertion.  Broken in commit 1da48c65.

Cc: qemu-stable@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qemu-char.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/qemu-char.c b/qemu-char.c
index 18c42a3..800d6a6 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3115,7 +3115,7 @@  static void qemu_chr_parse_memory(QemuOpts *opts, ChardevBackend *backend,
 
     backend->memory = g_new0(ChardevMemory, 1);
 
-    val = qemu_opt_get_number(opts, "size", 0);
+    val = qemu_opt_get_size(opts, "size", 0);
     if (val != 0) {
         backend->memory->has_size = true;
         backend->memory->size = val;