[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
[Qemu-devel] [PATCH v3 14/19] docs, qapi: document qemu-img map, Paolo Bonzini, 2013/07/25
[Qemu-devel] [PATCH v3 15/19] block: use bdrv_has_zero_init to return BDRV_BLOCK_ZERO, Paolo Bonzini, 2013/07/25
[Qemu-devel] [PATCH v3 16/19] raw-posix: return get_block_status data and flags, Paolo Bonzini, 2013/07/25
[Qemu-devel] [PATCH v3 17/19] raw-posix: detect XFS unwritten extents, Paolo Bonzini, 2013/07/25
[Qemu-devel] [PATCH v3 18/19] block: add default get_block_status implementation for protocols, Paolo Bonzini, 2013/07/25