]> git.proxmox.com Git - qemu.git/commitdiff
qemu-char: Fix ringbuf option size
authorMarkus Armbruster <armbru@redhat.com>
Thu, 27 Jun 2013 14:22:07 +0000 (16:22 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 14 Aug 2013 14:58:36 +0000 (09:58 -0500)
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>
(cherry picked from commit 0f953051178f2e3df36efa5158a71f33d35fa812)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qemu-char.c

index 3cdf075009efabb6f24f5ec3ed6fd960ff7d3eea..ad9408e6e4ca7090efae710385ddba8d64ea568f 100644 (file)
@@ -3162,7 +3162,7 @@ static void qemu_chr_parse_ringbuf(QemuOpts *opts, ChardevBackend *backend,
 
     backend->ringbuf = g_new0(ChardevRingbuf, 1);
 
-    val = qemu_opt_get_number(opts, "size", 0);
+    val = qemu_opt_get_size(opts, "size", 0);
     if (val != 0) {
         backend->ringbuf->has_size = true;
         backend->ringbuf->size = val;