From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXite-0002NS-Kc for qemu-devel@nongnu.org; Wed, 01 May 2013 22:05:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXitd-00060G-PK for qemu-devel@nongnu.org; Wed, 01 May 2013 22:05:22 -0400 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:53224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXitd-0005zx-8T for qemu-devel@nongnu.org; Wed, 01 May 2013 22:05:21 -0400 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 2 May 2013 11:57:21 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 53EEC2BB004F for ; Thu, 2 May 2013 12:05:15 +1000 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r42258rW16187518 for ; Thu, 2 May 2013 12:05:08 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r4225EgS005823 for ; Thu, 2 May 2013 12:05:14 +1000 Message-ID: <5181C9D4.4000905@linux.vnet.ibm.com> Date: Thu, 02 May 2013 10:05:08 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1366968675-1451-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1366968675-1451-8-git-send-email-xiawenc@linux.vnet.ibm.com> <20130426144657.GB7648@stefanha-thinkpad.redhat.com> <20130429150541.298db151@redhat.com> In-Reply-To: <20130429150541.298db151@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 7/7] block: dump to monitor for bdrv_snapshot_dump() and bdrv_image_info_dump() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: kwolf@redhat.com, phrdina@redhat.com, Stefan Hajnoczi , qemu-devel@nongnu.org, armbru@redhat.com, pbonzini@redhat.com 于 2013-4-30 3:05, Luiz Capitulino 写道: > On Fri, 26 Apr 2013 16:46:57 +0200 > Stefan Hajnoczi wrote: > >> On Fri, Apr 26, 2013 at 05:31:15PM +0800, Wenchao Xia wrote: >>> @@ -2586,10 +2585,12 @@ void do_info_snapshots(Monitor *mon, const QDict *qdict) >>> } >>> >>> if (total > 0) { >>> - monitor_printf(mon, "%s\n", bdrv_snapshot_dump(buf, sizeof(buf), NULL)); >>> + bdrv_snapshot_dump(NULL); >>> + monitor_printf(mon, "\n"); >> >> Luiz: any issue with mixing monitor_printf(mon) and >> monitor_vprintf(cur_mon) calls? I guess there was a reason for >> explicitly passing mon instead of relying on cur_mon. > > where are they being mixed? > bdrv_snapshot_dump() used a global variable "cur_mon" inside, instead of let caller pass in a explicit montior* "mon", I guess that is the question. -- Best Regards Wenchao Xia