From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4PlB-0007qf-Go for qemu-devel@nongnu.org; Thu, 23 Aug 2012 01:15:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4PlA-0000RC-Cr for qemu-devel@nongnu.org; Thu, 23 Aug 2012 01:15:13 -0400 Received: from e28smtp04.in.ibm.com ([122.248.162.4]:51435) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4Pl9-0000Jf-Mz for qemu-devel@nongnu.org; Thu, 23 Aug 2012 01:15:12 -0400 Received: from /spool/local by e28smtp04.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 23 Aug 2012 10:45:08 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7N5F2xV2752842 for ; Thu, 23 Aug 2012 10:45:02 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7N5F1mo003099 for ; Thu, 23 Aug 2012 15:15:01 +1000 From: Lei Li Date: Thu, 23 Aug 2012 13:14:22 +0800 Message-Id: <1345698866-19794-3-git-send-email-lilei@linux.vnet.ibm.com> In-Reply-To: <1345698866-19794-1-git-send-email-lilei@linux.vnet.ibm.com> References: <1345698866-19794-1-git-send-email-lilei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 2/6] monitor: Adjust qmp_human_monitor_command to new MemCharDriver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, eblake@redhat.com, Lei Li Signed-off-by: Lei Li --- monitor.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c index 480f583..ab4650b 100644 --- a/monitor.c +++ b/monitor.c @@ -642,7 +642,13 @@ char *qmp_human_monitor_command(const char *command_line, bool has_cpu_index, CharDriverState mchar; memset(&hmp, 0, sizeof(hmp)); - qemu_chr_init_mem(&mchar); + + /* Since the backend of MemCharDriver convert to a circular + * buffer with fixed size, so should indicate the init memory + * size. + * + * XXX: is 4096 as init memory enough for this? */ + qemu_chr_init_mem(&mchar, 4096); hmp.chr = &mchar; old_mon = cur_mon; -- 1.7.7.6