qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 13/19] qemu-img: add a "map" subcommand


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v3 13/19] qemu-img: add a "map" subcommand
Date: Wed, 31 Jul 2013 08:13:48 -0400 (EDT)

> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]