From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4VI0-0001vI-2Z for qemu-devel@nongnu.org; Wed, 31 Jul 2013 08:14:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4VHu-0002Cr-2z for qemu-devel@nongnu.org; Wed, 31 Jul 2013 08:13:59 -0400 Received: from mx3-phx2.redhat.com ([209.132.183.24]:46669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4VHt-0002CW-Ro for qemu-devel@nongnu.org; Wed, 31 Jul 2013 08:13:54 -0400 Date: Wed, 31 Jul 2013 08:13:48 -0400 (EDT) From: Paolo Bonzini Message-ID: <1630661476.7468316.1375272828246.JavaMail.root@redhat.com> In-Reply-To: <20130731085715.GD3090@dhcp-200-207.str.redhat.com> References: <1374762197-7261-1-git-send-email-pbonzini@redhat.com> <1374762197-7261-14-git-send-email-pbonzini@redhat.com> <20130730151353.GF2475@dhcp-200-207.str.redhat.com> <51F7DA48.1060807@redhat.com> <20130731085715.GD3090@dhcp-200-207.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 13/19] qemu-img: add a "map" subcommand List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: pl@kamp.de, qemu-devel@nongnu.org, stefanha@redhat.com > The documentation patch contains a line like this: > > 0 131072 2 327680 > > A heading line and tabs (or even better, fixed printf column widths) > sounds good, but I think if it's really only for human users and not for > shell scripts, we can further improve the output: > > Offset Length Mapped to File > > 0 + 128k -> 320k /tmp/backing.qcow2 > 128k + 256k -> 2M /tmp/overlay.qcow2 Changing depth to file is a good idea, but it rules out any possibility of using it in shell scripts due to newlines in files. I don't think + and -> add much and I'd rather leave them out. I'm quite ambivalent with respect to hexadecimal vs. decimal, of course hex is more readable. Some tools may prefer decimal, but then x=`eval echo "\$(($x))"` is an easy way to convert. Any user of this stuff is going to be quite technical, so in the end I would go for this: Offset Length Mapped to File 0x0 0x20000 0x50000 /tmp/backup.qcow2 Paolo