Received: from eggs.gnu.org ([208.118.235.92]:47801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgzYq-00026K-FE for qemu-devel@nongnu.org; Mon, 27 May 2013 11:42:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UgzYj-0001mn-GR for qemu-devel@nongnu.org; Mon, 27 May 2013 11:42:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgzYj-0001mf-7V for qemu-devel@nongnu.org; Mon, 27 May 2013 11:42:05 -0400 Date: Mon, 27 May 2013 17:40:59 +0200 From: Kevin Wolf Message-ID: <20130527154059.GG2373@dhcp-200-207.str.redhat.com> References: <1369451385-23452-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1369451385-23452-5-git-send-email-xiawenc@linux.vnet.ibm.com> <20130527110238.289c9dc7@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130527110238.289c9dc7@redhat.com> Subject: Re: [Qemu-devel] [PATCH V3 4/4] block: dump snapshot and image info to specified output List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: phrdina@redhat.com, stefanha@gmail.com, armbru@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com, Wenchao Xia Am 27.05.2013 um 17:02 hat Luiz Capitulino geschrieben: > On Sat, 25 May 2013 11:09:45 +0800 > Wenchao Xia wrote: > > > bdrv_snapshot_dump() and bdrv_image_info_dump() do not dump to a buffer now, > > some internal buffers are still used for format control, which have no > > chance to be truncated. As a result, these two functions have no more issue > > of truncation, and they can be used by both qemu and qemu-img with correct > > parameter specified. > > > > Signed-off-by: Wenchao Xia > > I don't like the casting and the void pointers very much, but I can't > suggest anything better: Maybe introduce and use a different function pointer type that explicitly takes void* instead of FILE*. You'd still have to cast the function pointers (and now actually in all instances), but then at least nobody can accidentally misinterpret a Monitor* as FILE*. Kevin