From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwVYV-0004lb-Je for qemu-devel@nongnu.org; Wed, 01 Aug 2012 05:49:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwVYR-0000vm-DP for qemu-devel@nongnu.org; Wed, 01 Aug 2012 05:49:27 -0400 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:58282) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwVYQ-0000vP-Pq for qemu-devel@nongnu.org; Wed, 01 Aug 2012 05:49:23 -0400 Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 1 Aug 2012 15:19:19 +0530 Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q719nGhG23658614 for ; Wed, 1 Aug 2012 15:19:16 +0530 Received: from d28av04.in.ibm.com (loopback [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q719nFTU001996 for ; Wed, 1 Aug 2012 19:49:15 +1000 From: Lei Li Date: Wed, 1 Aug 2012 17:48:56 +0800 Message-Id: <1343814538-27591-3-git-send-email-lilei@linux.vnet.ibm.com> In-Reply-To: <1343814538-27591-1-git-send-email-lilei@linux.vnet.ibm.com> References: <1343814538-27591-1-git-send-email-lilei@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC PATCH 2/4] 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, stefanha@linux.vnet.ibm.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 49dccfe..c1a4d81 100644 --- a/monitor.c +++ b/monitor.c @@ -645,7 +645,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