Received: from eggs.gnu.org ([2001:4830:134:3::10]:46589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uuf1p-0004YL-40 for qemu-devel@nongnu.org; Thu, 04 Jul 2013 04:36:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uuf1i-0005rx-Bg for qemu-devel@nongnu.org; Thu, 04 Jul 2013 04:36:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uuf1i-0005rU-1X for qemu-devel@nongnu.org; Thu, 04 Jul 2013 04:36:30 -0400 Date: Thu, 4 Jul 2013 16:36:22 +0800 From: Fam Zheng Message-ID: <20130704083622.GB26601@T430s.nay.redhat.com> References: <1372862071-28225-1-git-send-email-pbonzini@redhat.com> <1372862071-28225-13-git-send-email-pbonzini@redhat.com> <20130704053448.GD6659@T430s.nay.redhat.com> <51D52F40.3000209@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51D52F40.3000209@redhat.com> Subject: Re: [Qemu-devel] [PATCH 12/17] qemu-img: add a "map" subcommand Reply-To: famz@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, pl@kamp.de, qemu-devel@nongnu.org, stefanha@redhat.com On Thu, 07/04 10:16, Paolo Bonzini wrote: > Il 04/07/2013 07:34, Fam Zheng ha scritto: > >> > + if ((e->flags & (BDRV_BLOCK_DATA|BDRV_BLOCK_ZERO)) == BDRV_BLOCK_DATA) { > >> > + printf("%lld %lld %d %lld\n", > >> > + (long long) e->start, (long long) e->length, > >> > + e->depth, (long long) e->offset); > >> > + } > > Why %lld and explicit cast, not using PRId64? > > Will fix. > > > Is BDRV_BLOCK_DATA and BDRV_BLOCK_ZERO distinguishable here for the > > user? By offset? > > I'm not sure I understand the question. > > Zero blocks are always omitted in the "human" format. Only non-zero > blocks are listed. I missed this. -- Fam