From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uuei5-00049o-Dg for qemu-devel@nongnu.org; Thu, 04 Jul 2013 04:16:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uuei1-0006Dq-0O for qemu-devel@nongnu.org; Thu, 04 Jul 2013 04:16:13 -0400 Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]:45353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uuei0-0006Di-QW for qemu-devel@nongnu.org; Thu, 04 Jul 2013 04:16:08 -0400 Received: by mail-wg0-f42.google.com with SMTP id z11so6198848wgg.1 for ; Thu, 04 Jul 2013 01:16:08 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51D52F40.3000209@redhat.com> Date: Thu, 04 Jul 2013 10:16:00 +0200 From: Paolo Bonzini MIME-Version: 1.0 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> In-Reply-To: <20130704053448.GD6659@T430s.nay.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 12/17] qemu-img: add a "map" subcommand List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: famz@redhat.com Cc: kwolf@redhat.com, pl@kamp.de, qemu-devel@nongnu.org, stefanha@redhat.com 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. Paolo